[petsc-dev] GASM

Dmitry Karpeev karpeev at mcs.anl.gov
Thu Mar 29 09:28:10 CDT 2012


On Thu, Mar 29, 2012 at 9:04 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Thu, Mar 29, 2012 at 07:58, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:
>
>> I am not sure how to solve the problem of the relationship between
>> KSPReset() and PCReset() when the pc is being shared.
>> 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.
>>
>
> 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_.
>
Okay.  I guess if a pc is being shared by multiple ksps, either all or none
of these ksps had better want to reset, because
a KSPReset() by one of them will reset the pc for all of them.

Back to the original problem: how shall we prevent a shared pc from being
gutted by an unprotected PCReset() cascading from a KSPDestroy() on one of
the containing ksps?  I can factor out KSPReset_Private()/PCReset_Private()
as indicated before, unless there are objections.

Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120329/b1ce8316/attachment.html>


More information about the petsc-dev mailing list