On 10/21/19 9:11 AM, Zhidong Brian Zhang wrote: > > It was very time-consuming to execute because I put the vector access, > say opt->x(local_dof_indices_dg_int), in the most inner loop. I don't > need to access it for each quadrature point nor each degree of freedom. > Because for each cell, the opt->x is fixed. So I put opt->x in the > outside of those loops, and the computing time is normal now.
Glad to hear. And yes, moving things out of inner loops is a good strategy! Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: [email protected] www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/578da0df-9867-a4a8-4fd9-6ea474e85925%40colostate.edu.
