Evaluating FE-solution on distributed mesh, semi-Lagrangian method

61 views
Skip to first unread message

Konrad Simon

unread,
May 11, 2020, 6:26:47 AM5/11/20
to deal.II User Group
Dear all,

I am currently working on a semi-Lagrangian method for an advection-diffusion equation. During runtime I must evaluate the (known) FE-solution at a previous time step but the mesh is distributed.

Problem: It can well be that I must evaluate the solution at a point that is in a cell that is not locally owed by the processor requesting that value or not even a ghost cell. I am aware of the FEFieldFunction class and that it says that an exception will be thrown if the point is found to be in an artificial cell. 

Now, does anyone here have experience with that? Am I doomed and will I have to manually MPI communicate such points to any processor and test if they own the relevant cell?

Any help would be much appreciated.

Best,
Konrad

Bruno Turcksin

unread,
May 11, 2020, 8:49:21 AM5/11/20
to deal.II User Group
Konrad,

Unfortunately, you will need to do the communication yourself. You can only evaluate the solution on cells that locally owned or on ghost cells.

Best,

Bruno

Konrad Simon

unread,
May 12, 2020, 6:04:47 AM5/12/20
to deal.II User Group
Thank you, Bruno. What is sometimes done for semi-Lagrangian methods is that one defines a halo region around the locally owned cells (like ghost cells) that contains information from previous time steps and then limits the time step so that one never leaves the halo region when asking for information from previous time steps. Is there a way in Deal.ii to control the size of the halo region. In my case I have pretty uniform grids if it helps.

Best,
Konrad

Bruno Turcksin

unread,
May 12, 2020, 8:50:35 AM5/12/20
to dea...@googlegroups.com
Konrad,

There is nothing out of the box. However, deal.II uses p4est which can
use more that one layer of ghost cells. So you should take a look
there to see how hard it is to change the code. If that's the way you
want to go, I am sure that someone will be able to provide you with
some guidance.

Best,

Bruno
> --
> 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 a topic in the Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/9li9twVxrGE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/bfc6dd81-abb3-421c-8f6c-539c234b624f%40googlegroups.com.

Konrad Simon

unread,
May 14, 2020, 10:10:33 AM5/14/20
to deal.II User Group
Thank you, Bruno. :-)


On Tuesday, May 12, 2020 at 2:50:35 PM UTC+2, Bruno Turcksin wrote:
Konrad,

There is nothing out of the box. However, deal.II uses p4est which can
use more that one layer of ghost cells. So you should take a look
there to see how hard it is to change the code. If that's the way you
want to go, I am sure that someone will be able to provide you with
some guidance.

Best,

Bruno

Le mar. 12 mai 2020 à 06:04, Konrad Simon <ksimo...@gmail.com> a écrit :
>
> Thank you, Bruno. What is sometimes done for semi-Lagrangian methods is that one defines a halo region around the locally owned cells (like ghost cells) that contains information from previous time steps and then limits the time step so that one never leaves the halo region when asking for information from previous time steps. Is there a way in Deal.ii to control the size of the halo region. In my case I have pretty uniform grids if it helps.
>
> Best,
> Konrad
>
> On Monday, May 11, 2020 at 2:49:21 PM UTC+2, Bruno Turcksin wrote:
>>
>> Konrad,
>>
>> Unfortunately, you will need to do the communication yourself. You can only evaluate the solution on cells that locally owned or on ghost cells.
>>
>> Best,
>>
>> Bruno
>
> --
> 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 a topic in the Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/9li9twVxrGE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to dea...@googlegroups.com.

Konrad Simon

unread,
Sep 27, 2020, 5:01:41 AM9/27/20
to deal.II User Group
Dear all,

I finally had time to go back to my code. Quick problem summary: I am currently working on a semi-Lagrangian method for an advection-diffusion equation with a multiscale method that I designed for advection dominated processes. During runtime I must evaluate the (known) multiscale FE-solution object at a previous time step. 

Problem: The mesh is distributed and the object that will give me the evaluated data at a point p is possibly owned on another processor. The processor that owes the object is the same as the one owing the cell that surrounds p. To find the correct cell on the same processor that needs the information I am doing things similarly as the FEFieldFunction class to find the cell. But what if p is in a cell that is not locally owned? It could be in a ghost cell or an artificial one (also ghosts no not owe the data I need).

Now, I have have to manually MPI communicate such points to find out the MPI rank that owes the cell surrounding p as I found out with your help. Any way of doing this efficiently? I would like to avoid the brute force version: communicating all points to all ranks and search the owned cells. (Hint: Mostly (but not always) p will be in a ghost layer. )

Any way to get the actual MPI rank of the owner?

Any help would be much appreciated.

Best,
Konrad

heena patel

unread,
Sep 27, 2020, 6:11:46 AM9/27/20
to dea...@googlegroups.com

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/1b60b7a8-361a-4f2f-9216-50190ab7e950n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages