Is any faster version of VectorTools::point_gradient?

49 views
Skip to first unread message

沈键

unread,
Dec 14, 2021, 10:16:51 AM12/14/21
to deal.II User Group
Hello,
  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:
  Is any ready-made function of `point_gradient` in deal.II supporting searching the specified point's owner cell only around given cells not globally? 
  Thanks for your reply in advance.

Daniel Arndt

unread,
Dec 14, 2021, 6:30:04 PM12/14/21
to dea...@googlegroups.com

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/d2dca380-e475-400a-9c30-345f824550aan%40googlegroups.com.

Wolfgang Bangerth

unread,
Dec 15, 2021, 1:15:49 PM12/15/21
to dea...@googlegroups.com

>   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/
Reply all
Reply to author
Forward
0 new messages