[petsc-users] PCComposite

Jed Brown jedbrown at mcs.anl.gov
Mon May 28 08:20:02 CDT 2012


On Mon, May 28, 2012 at 5:19 AM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:

> Sorry for repost the following question, but after reading composite.c and
> asm.c,
> I can not understand.  I observed that my subroutine for modifying
> submatrices of PCASM was
> called twice.  In composite.c it seems there is no calling of PCSetUp on
> its componential PC's.
> In asm.c, the PCSetUp_ASM first determines whether pc->setupcalled is true.
>
> I think this is a general question for PCComposite say pc. If it consists
> of two pc's  pc0, pc1
> and I have PCSetUp(pc0), I would not expect pc0 to be SetUp again.  I can
> not understand
> in my case why PCASM seems SetUp twice.
>

Does the routine do anything or just return immediately? If nothing has
been changed since the last time a PC was set up, it should return
immediately. If you have changed some configuration, it may need to be set
up again.



>
> Thanks!
> Hui
>
>
> > I have got a new question.  I'm now constructing a PCComposite from
> PCASM and another PCKSP (coarse
> > problem). And construction of PCKSP needs to use the subksp's of PCASM.
> So I need to PCSetUp on the
> > PCASM, right?  But the KSP using PCComposite would setup PCASM again.
>  How can I avoid twice setup
> > of PCASM ?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120528/23f5dc22/attachment-0001.html>


More information about the petsc-users mailing list