On 4/25/23 09:44, Lucas Myers wrote:

Re: FEPointEvaluation and RemotePointEvaluation, I think I actually need more than that because I need the quadrature points on each of the cells that I'm querying, so I can just do the standard procedure with FEValues and the corresponding Quadrature object.

In that case, the way I would implement this is that every process makes a list of circles: points at which it wants to evaluate the convolution, and the radius of the convolution.

In a second step, you then determine which of these circles require communication. This isn't actually entirely trivial, but a good criterion is probably whether a circle has overlap with an artificial cell. So:
  std::set<Circle> all_circles = ...;
  std::set<Circle> circles_requiring_communication;
  for (cell=...)
    if (cell->is_artificial())
      for (c : all_circles)
        if (c not already in circles_requiring_communication)
         if (c overlaps with cell)
           circles_requiring_communication.insert (c);

In a third step, you can either send all of these circles to all other processes (via Utilities::MPI::all_gather()), or you can be a bit smarter and first get a bounding box for each of the other processes' locally owned cells (see the function in GridTools for that); in that latter case, you'd only send a circle to a process if it overlaps with that other process's bounding box, using one of the ConsensusAlgorithms functions.

At this point, each process has a list of circles that overlap with its own subdomain. Now you work on that by looping over all of its locally owned cells, on each cell query all circles, and do what you need to do. This results in a list of contributions that need to be sent back to the original process requesting that information. This could probably be done nicely using the request-answer system of the ConsensusAlgorithms functions.

You'd need to be careful with cases where a process gets sent a circle that has overlap with its bounding box, but not with any of its cells. In that case, the reply is simply a zero contribution to the convolution integral.

I hope this makes sense!

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/e7a98b0a-8b4a-c626-b823-63a14dd2ccde%40colostate.edu.

Reply via email to