[petsc-dev] Integrating PFLOTRAN, PETSC & SAMRAI

Boyce Griffith griffith at cims.nyu.edu
Mon Jun 6 16:23:41 CDT 2011



On 6/6/11 5:11 PM, Jed Brown wrote:
> On Mon, Jun 6, 2011 at 23:09, Boyce Griffith <griffith at cims.nyu.edu
> <mailto:griffith at cims.nyu.edu>> wrote:
>
>     Oh, right, except that getVector() is called even on Vec's that are
>     not modified.
>
>
> What comes out of getVector()? Is it an object that can keep track of
> whether it is modified?

Not without hacking up SAMRAI itself (effectively duplicating all of the 
state tracking stuff that is handled by PETSc).

One somewhat unappealing option would be to punt this to the user --- 
and to require them to know whether or not the thing that came out of 
getVector() has been modified.

> If your programming model uses RAII, the destructor can also be used to
> propagate state.

Destructors don't get called within calls to KSPSolve()/SNESSolve() 
(unless called via PETSc internals).

-- Boyce



More information about the petsc-dev mailing list