<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 13, 2019 at 5:25 AM Pierre Gubernatis via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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"><div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font size="4" face="monospace"><a name="m_-2815794751953062832__GoBack"></a><span lang="EN-US">Hello all,</span></font></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font size="4" face="monospace"><span lang="EN-US">It souds that the best way to introduce
petsc in a code is not to introduce it, but develop the code over the petsc
structure.</span></font></p></div></blockquote><div><br></div><div>All things being equal, yes, but few users start with PETSc from scratch. You situation is normal and Matt's suggestion of mirroring your mesh in PETSc mesh object (DM) is a common approach. </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 dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="monospace"><span lang="EN-US" style="font-size:large">It is probably true but my problem is that my existing code </span><span lang="EN-US"><font size="4">already is equipped with a</font></span><font size="4"> domain decomposition based on MPI (</font><span lang="EN-US" style="font-size:large">a typical themal hydraulic with cartesian
staggered mesh)</span></font></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font size="4" face="monospace">The user can slice the domain in
sub-domains and construct a linear problem by block: each sub-domain assembles
its part of the operator and its part of the RHS.</font></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><span style="font-size:large"><font face="monospace">I am wondering what is the best way now to introduce petsc (considering that I don’t want to assemble a global
operator on a given proc). Is there an example that would show how to
introduce petsc in this situation ?</font></span></p><div><font face="monospace" size="4">Thank you, </font><span style="font-size:large;font-family:monospace">Pierre </span><span style="font-size:large;font-family:monospace">  </span><span style="font-size:large;font-family:monospace"> </span></div></div>
</blockquote></div></div>