<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 18, 2014 at 2:42 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><p dir="ltr"><br>
On Aug 18, 2014 2:28 PM, "Luc Berger-Vergiat" <<a href="mailto:lb2653@columbia.edu" target="_blank">lb2653@columbia.edu</a>> wrote:<br>
><br>
> Hi all,<br>
> I am using the fieldsplit/DM facility to work on a multiphysics problem.<br>
> I would like to get some field dependent convergence information.<br>
> Is there something similar to the VecStrideNorm function that can compute a residual for each field defined in the DM?<br>
> Or should I use the DM to extract subvectors and compute their norms?</p>
</div></div><p dir="ltr">I wroteca monitor that does this. I am currently out of internet range, but I will mail it Wed when I get back.</p></blockquote><div>Okay, what I have is not exactly what you want. I wrote something to look at the errors by field:</div>
<div><br></div><div>    ierr = DMPlexComputeL2FieldDiff(dm, user->exactFuncs, (void *) ctxs, u, ferror);CHKERRQ(ierr);</div><div><br></div><div>but you want the residual. If we do not care too much about performance, we can easily do this using</div>
<div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetSubVector.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetSubVector.html</a></div><div><br></div>
<div>and then VecNorm, where we get the IS from</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitGetIS.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitGetIS.html</a></div>
<div><br></div><div>You can write a simple monitor that calls these two.</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-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<p dir="ltr">  Thanks</p>
<p dir="ltr">      Matt</p><span class=""><font color="#888888">
<p dir="ltr">> -- <br>
> Best,<br>
> Luc<br>
><br>
><br>
</p>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>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>