<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Il giorno 24 feb 2020, alle ore 12:58, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> ha scritto:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div dir="ltr" class="">On Mon, Feb 24, 2020 at 6:35 AM Pierpaolo Minelli <<a href="mailto:pierpaolo.minelli@cnr.it" class="">pierpaolo.minelli@cnr.it</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">Il giorno 24 feb 2020, alle ore 12:24, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> ha scritto:</div><br class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="">On Mon, Feb 24, 2020 at 5:30 AM Pierpaolo Minelli <<a href="mailto:pierpaolo.minelli@cnr.it" target="_blank" class="">pierpaolo.minelli@cnr.it</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Hi,<br class="">I'm developing a 3D code in Fortran to study the space-time evolution of charged particles within a Cartesian domain.<br class="">The domain decomposition has been made by me taking into account symmetry and load balancing reasons related to my specific problem.</blockquote><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">My decomposition at the moment is paractically a 2D decomposition because i have:</div><div class=""><br class=""></div><div class="">M = 251 (X)</div><div class="">N = 341 (Y)</div><div class="">P = 161 (Z)</div><div class=""><br class=""></div><div class="">and if i use 24 MPI procs, i divided my domain in a 3D Cartesian Topology with:</div><div class=""><br class=""></div><div class="">m = 4</div><div class="">n = 6</div><div class="">p = 1</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">In this first draft, it will remain constant throughout my simulation.<br class=""><br class="">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 class=""></blockquote><div class=""><br class=""></div><div class="">How do you discretize the Poisson equation?</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I intend to use a 7 point stencil like that in this example:</div><div class=""><br class=""></div><div class=""><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex22f.F90.html" target="_blank" class="">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex22f.F90.html</a></div></div></div></blockquote><div class=""><br class=""></div><div class="">Okay, then you can do exactly as Mark says and use that example. This will allow you to use geometric multigrid</div><div class="">for the Poisson problem. I don't think it can be beaten speed-wise.</div><div class=""><br class=""></div><div class=""> <span class="Apple-converted-space"> </span>Thanks,</div><div class=""><br class=""></div><div class="">     Matt</div><div class=""> </div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>Ok, i will try this approach and let you know.</div><div><br class=""></div><div>Thanks again</div><div><br class=""></div><div>Pierpaolo</div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">  Thanks,</div><div class=""><br class=""></div><div class="">    Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: 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 class="">Matrix coefficients (LHS) and boundary conditions are constant during my simulation.<br class=""><br class="">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 class=""><br class="">Is there an example that I can use in Fortran to solve this kind of problem?<br class=""><br class="">Thanks in advance<br class=""><br class="">Pierpaolo Minelli<br class=""><br class=""></blockquote></div><br clear="all" class=""></div></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Pierpaolo</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></div></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></body></html>