> I want to compute streamlines in deal.II after solving a velocity
> potential equation, so I need to get velocity (gradient of solution) on
> the point to take the streamline a step forward. Unfortunately, each
> streamline consists around 2000 points which means it should call
> `VectorTools::point_gradient` 2000 times. It takes too much time. I
> search the document but find VectorTools::point_gradient only support
> searching the point belong to which cell globally. I think it can be
> optimized, because if I have got previous point, next point should
> locate in the same cell or neighbor cells. My question is:
To augment the generic solution Daniel already pointed out, let me
mention that Rene Gassmoeller a while ago put a *lot* of work on doing
exactly what you are looking for in ASPECT. This work is documented here:
https://www.math.colostate.edu/~bangerth/publications/2016-particles.pdf
A longer version exists here:
https://arxiv.org/abs/1612.03369
The algorithm described in the paper is implemented starting here, in
ParticleHandler::sort_particles_into_subdomains_and_cells():
https://github.com/dealii/dealii/blob/master/source/particles/particle_handler.cc#L1299
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/