[petsc-dev] DMMG without libpetscsnes?
Jed Brown
jed at 59A2.org
Thu Jan 7 07:13:55 CST 2010
I'm using a DMMG inside of a Schur fieldsplit, but I have to create it
before PCSetUp because the hierarchy is generated by refinement. It
doesn't make sense to call DMMGSetKSP before PCSetUp because that matrix
would be worthless, but I want to be able to view the DMMG even if only
to inspect the hierarchy. While putting in a check for NULL snes in
DMMGView, I noticed these lines in damg.c
/* use of PetscObjectView() means we do not have to link with libpetscsnes if SNES is not being used */
ierr = PetscObjectView((PetscObject)dmmg[nlevels-1]->snes,viewer);CHKERRQ(ierr);
This appears to be stale because damg.c *is* part of libpetscsnes. In
fact, all of damg.c can be moved to ksp/ksp/utils after
s.PETSCSNES_DLLEXPORT.PETSCKSP_DLLEXPORT., but DMMGSetUp (in damgsnes.c)
currently has a real dependency on SNES due to SNESGetKSP's special
treatment of DMComposite+PCFieldSplit.
Is there value in having DMMG usable in the absence of libpetscsnes
(i.e. DMMGSetUp's dependency on SNES will be broken)?
Jed
More information about the petsc-dev
mailing list