On 7/7/22 02:34, Simon Wiesheier wrote:
Just to make sure that I chose a reasonable approach:

//create FEValues object whenever I need it, that is, 'number_of_cells*number_of_qps_per_cell' times
FEValues<2> fe_values(dof_handler.get_fe(),
                                        Quadrature<2>(my_point_in_ref_coords),
                                        update_gradients);
fe_values.reinit(cell);

//evaluate, say, the gradient of the second shape function in real coords at "my_point_in_ref_coords"
Tensor<1,2> shape_gradient_real_second = fe_values.shape_grad(1, 0);

Yes, this looks reasonable.


Without measuring the time but based on your intuition - the approach using FEPointEvaluation would not be much faster, would it?

Even good programmers cannot say which versions of code perform better or worse without actually benchmarking. You'll have to try it out. I suspect that the overall cost is dominated by computing the reference coordinates of an arbitrary point, but I don't know for sure.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/87948105-0f5d-1279-9202-ec4c86bfe3be%40colostate.edu.

Reply via email to