Dear all, I implemented two different versions to compute a stress for a given strain and want to compare the associated computation times in release mode.
version 1: stress = fun1(strain) cpu time: 4.52 s wall time: 4.53 s version 2: stress = fun2(strain) cpu time: 32.5 s wall time: 167.5 s fun1 and fun2, respectively, are invoked for all quadrature points (1,286,144 in the above example) defined on the triangulation. My program is not parallelized. In fun2, I call find_active_cell_around_point <https://www.dealii.org/current/doxygen/deal.II/namespaceGridTools.html#a2e10aeb1c8e76110a84b6945eac3aaf0> twice for two different points on two different (helper) triangulations and initialize two FEValues objects with the points ' ref_point_vol' and 'ref_point_dev' as returned by find_active_cell_around_point <https://www.dealii.org/current/doxygen/deal.II/namespaceGridTools.html#a2e10aeb1c8e76110a84b6945eac3aaf0> . FEValues<1> fe_vol(dof_handler_vol.get_fe(), Quadrature<1>(ref_point_vol), update_gradients | update_values); FEValues<1> fe_values_energy_dev(this->dof_handler_dev.get_fe(), Quadrature<1>(ref_point_dev), update_gradients | update_values); I figured out that the initialization of the two FEValues objects is the biggest portion of the above mentioned times. In particular, if I comment the initialization out, I have cpu time: 6.54 s wall time: 6.55 s . The triangulations associated with dof_handler_vol and dof_handler_dev are both 1d and store only 4 and 16 elements, respectively. That said, I am wondering why the initialization takes so long (roughly 100 seconds wall time in total) and why this causes a gap between the cpu and wall time. Unfortunately, I have to reinitialize them anew whenever fun2 is called, because the point 'ref_point_vol' (see Quadrature<1>(ref_point_vol)) is different in each call to fun2. Best Simon -- 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/8f0e7843-c382-44bc-8e24-bbb65818c40cn%40googlegroups.com.
