[petsc-users] Using DMDAs with an assigned domain decomposition to Solve Poisson Equation
Pierpaolo Minelli
pierpaolo.minelli at cnr.it
Mon Feb 24 06:07:09 CST 2020
> Il giorno 24 feb 2020, alle ore 12:58, Matthew Knepley <knepley at gmail.com> ha scritto:
>
> On Mon, Feb 24, 2020 at 6:35 AM Pierpaolo Minelli <pierpaolo.minelli at cnr.it <mailto:pierpaolo.minelli at cnr.it>> wrote:
>
>
>> Il giorno 24 feb 2020, alle ore 12:24, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> ha scritto:
>>
>> On Mon, Feb 24, 2020 at 5:30 AM Pierpaolo Minelli <pierpaolo.minelli at cnr.it <mailto:pierpaolo.minelli at cnr.it>> wrote:
>> Hi,
>> I'm developing a 3D code in Fortran to study the space-time evolution of charged particles within a Cartesian domain.
>> The domain decomposition has been made by me taking into account symmetry and load balancing reasons related to my specific problem.
>>
>> That may be a problem. DMDA can only decompose itself along straight lines through the domain. Is that how your decomposition looks?
>
> My decomposition at the moment is paractically a 2D decomposition because i have:
>
> M = 251 (X)
> N = 341 (Y)
> P = 161 (Z)
>
> and if i use 24 MPI procs, i divided my domain in a 3D Cartesian Topology with:
>
> m = 4
> n = 6
> p = 1
>
>
>>
>> In this first draft, it will remain constant throughout my simulation.
>>
>> Is there a way, using DMDAs, to solve Poisson's equation, using the domain decomposition above, obtaining as a result the local solution including its ghost cells values?
>>
>> How do you discretize the Poisson equation?
>
> I intend to use a 7 point stencil like that in this example:
>
> https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex22f.F90.html <https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex22f.F90.html>
>
> Okay, then you can do exactly as Mark says and use that example. This will allow you to use geometric multigrid
> for the Poisson problem. I don't think it can be beaten speed-wise.
>
> Thanks,
>
> Matt
>
Ok, i will try this approach and let you know.
Thanks again
Pierpaolo
>>
>> Thanks,
>>
>> Matt
>>
>> As input data at each time-step I know the electric charge density in each local subdomain (RHS), including the ghost cells, even if I don't think they are useful for the calculation of the equation.
>> Matrix coefficients (LHS) and boundary conditions are constant during my simulation.
>>
>> As an output I would need to know the local electrical potential in each local subdomain, including the values of the ghost cells in each dimension(X,Y,Z).
>>
>> Is there an example that I can use in Fortran to solve this kind of problem?
>>
>> Thanks in advance
>>
>> Pierpaolo Minelli
>>
>>
>
>
> Thanks
> Pierpaolo
>
>>
>> --
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>>
>> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
>
>
>
> --
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200224/534e3f42/attachment.html>
More information about the petsc-users
mailing list