File snes.cxx#

Functions

static PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx)
static PetscErrorCode FormFunctionForDifferencing(void *ctx, Vec x, Vec f)

PETSc callback function for forming Jacobian

This function can be a linearised form of FormFunction

static PetscErrorCode FormFunctionForColoring(SNES snes, Vec x, Vec f, void *ctx)

SNES callback for forming Jacobian with coloring

This can be a linearised and simplified form of FormFunction

static PetscErrorCode snesPCapply(PC pc, Vec x, Vec y)#