Barry Smith <[email protected]> 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.
pgpQJPXWxxjl2.pgp
Description: PGP signature
