I currently have the solution to a PDE stored in a Vector<double> solution. I need to compute the solution at some Point<2> loc. I accomplish this using the function

VectorTools::point_value(dof_handler, solution, loc, val);

which fills val with the value I care about. Similarly, I get the gradient with point_gradient.

This accomplishes what I need but if I have a lot of points like loc and have to do this every timestep then it quickly becomes a computational bottleneck.

If I am not refining the mesh, is there a more efficient why of accomplishing this? I assume by storing the specific cell that loc is in?

If you have multiple points, and if the points are always the same, you are in luck that someone has already implemented what you are looking for in this program:

https://dealii.org/developer/doxygen/deal.II/code_gallery_MCMC_Laplace.html

:-)

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/9966abae-0ec8-2e7c-8cf5-b9b0b2afc511%40colostate.edu.

Reply via email to