<div class="gmail_quote">On Thu, Mar 29, 2012 at 07:58, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov">karpeev@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I am not sure how to solve the problem of the relationship between KSPReset() and PCReset() when the pc is being shared.</div><div>How useful are KSPReset() and PCReset() anyway? All but one uses I found were "trivial" -- called from a PCReset_XXX, where XXX uses a KSP internally. The only nontrivial use I found was in VIRS, where the KSP and PC are reset when the active set changes. Would a simple KSPDestroy() do here instead? Perhaps there are uses of KSPReset()/PCReset() in user code, though.</div>
</blockquote></div><br><div>The purpose of all the XXReset() routines is to destroy internal data structures so that the size of the matrix can be changed without needing to reconfigure a new solver. For example, an AMR simulation would change the mesh, create new matrices and vectors, but want to reuse a solver _configuration_.</div>