[petsc-dev] viewing factored matrices
Jed Brown
jedbrown at mcs.anl.gov
Fri Nov 22 18:36:41 CST 2013
Barry Smith <bsmith at mcs.anl.gov> writes:
>> Indeed, but I thought we wanted to avoid this because it can lead to
>> options being checked on each iteration
>
> No, no, and no. Look in mg.c
>
> if (!pc->setupcalled) {
> for (i=0; i<n; i++) {
> ierr = KSPSetFromOptions(mglevels[i]->smoothd);CHKERRQ(ierr);
In gamg.c:
PetscBool redo_mesh_setup = (PetscBool)(!pc_gamg->reuse_prol);
if (redo_mesh_setup) {
/* reset everything */
ierr = PCReset_MG(pc);CHKERRQ(ierr);
pc->setupcalled = 0;
The number of levels can change because the strength of connection and
thus thresholding changes.
> You are correct that currently there are other unprotected calls in
> fieldsplit.c but I think they can be easily fixed so that the inner
> SetFromOptions() is called only when setup called is zero. Having
> non-nested XXXSetFromOptions() has nothing to do with things being
> check every iteration stuff.
Fair enough, the case above is a different issue and I agree that your
other points are at the very least, pragmatic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131122/6347c951/attachment.sig>
More information about the petsc-dev
mailing list