27 Feb
2012
27 Feb
'12
11:24 a.m.
On Mon, Feb 27, 2012 at 11:21, Matthew Knepley <[email protected]> wrote:
Having DM hold the callbacks is a problem. But don't we have them in the context arg?
PetscErrorCode SNESDMComputeJacobian(SNES snes,Vec X,Mat *J,Mat *B,MatStructure *flag,void *ptr) { PetscErrorCode ierr; DM dm; PetscFunctionBegin; ierr = SNESGetDM(snes,&dm);CHKERRQ(ierr); ierr = DMComputeJacobian(dm,X,*J,*B,flag);CHKERRQ(ierr); PetscFunctionReturn(0); } The SNES is not available from the callback.
Aren't they just passed in? Or do you mean auxiliary vectors?
Auxiliary vectors. In this case, they are used by TS to convert the semi-discrete form provided by the user into the fully discrete form being solved by SNES.