<div dir="ltr"><div dir="ltr">On Mon, Feb 24, 2020 at 6:35 AM Pierpaolo Minelli <<a href="mailto:pierpaolo.minelli@cnr.it">pierpaolo.minelli@cnr.it</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><br><blockquote type="cite"><div>Il giorno 24 feb 2020, alle ore 12:24, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> ha scritto:</div><br><div><div dir="ltr"><div dir="ltr">On Mon, Feb 24, 2020 at 5:30 AM Pierpaolo Minelli <<a href="mailto:pierpaolo.minelli@cnr.it" target="_blank">pierpaolo.minelli@cnr.it</a>> wrote:<br></div><div class="gmail_quote"><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.</blockquote><div><br></div><div>That may be a problem. DMDA can only decompose itself along straight lines through the domain. Is that how your decomposition looks?</div></div></div></div></blockquote><div><br></div><div>My decomposition at the moment is paractically a 2D decomposition because i have:</div><div><br></div><div>M = 251 (X)</div><div>N = 341 (Y)</div><div>P = 161 (Z)</div><div><br></div><div>and if i use 24 MPI procs, i divided my domain in a 3D Cartesian Topology with:</div><div><br></div><div>m = 4</div><div>n = 6</div><div>p = 1</div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 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>How do you discretize the Poisson equation?</div></div></div></div></blockquote><div><br></div><div>I intend to use a 7 point stencil like that in this example:</div><div><br></div><div><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex22f.F90.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex22f.F90.html</a></div></div></div></blockquote><div><br></div><div>Okay, then you can do exactly as Mark says and use that example. This will allow you to use geometric multigrid</div><div>for the Poisson problem. I don't think it can be beaten speed-wise.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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">
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>
<br>
Thanks in advance<br>
<br>
Pierpaolo Minelli<br>
<br>
</blockquote></div><br clear="all"></div></div></blockquote><div><br></div><div><br></div><div>Thanks</div><div>Pierpaolo</div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</div></blockquote></div><br></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>