<div dir="ltr"><div dir="ltr"><div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 24, 2020 at 5:30 AM Pierpaolo Minelli <<a href="mailto:pierpaolo.minelli@cnr.it">pierpaolo.minelli@cnr.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
I'm developing a 3D code in Fortran to study the space-time evolution of charged particles within a Cartesian domain.<br>
The domain decomposition has been made by me taking into account symmetry and load balancing reasons related to my specific problem. In this first draft, it will remain constant throughout my simulation.<br>
<br>
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?<br></blockquote><div><br></div><div><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMGlobalToLocalBegin.html#DMGlobalToLocalBegin">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMGlobalToLocalBegin.html#DMGlobalToLocalBegin</a></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
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.<br>
Matrix coefficients (LHS) and boundary conditions are constant during my simulation.<br>
<br>
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).<br>
<br>
Is there an example that I can use in Fortran to solve this kind of problem?<br></blockquote><div><br></div><div>I see one, but it is not hard to convert a C example:</div><div><br></div><div><div dir="ltr"><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex14f.F90.html">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex14f.F90.html</a><br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks in advance<br>
<br>
Pierpaolo Minelli<br>
<br>
</blockquote></div></div>