SNESDAFormFunction

This is a universal function evaluation routine that may be used with SNESSetFunction() as long as the user context has a DA as its first record and the user has called DASetLocalFunction().

Synopsis

#include "petscda.h"    
#include "petscmg.h"    
#include "petscdmmg.h"  
PetscErrorCode PETSCSNES_DLLEXPORT SNESDAFormFunction(SNES snes,Vec X,Vec F,void *ptr)
Collective on SNES

Input Parameters

snes - the SNES context
X - input vector
F - function vector
ptr - pointer to a structure that must have a DA as its first entry. For example this could be a DMMG, this ptr must have been passed into SNESDAFormFunction() as the context

See Also

DASetLocalFunction(), DASetLocalJacobian(), DASetLocalAdicFunction(), DASetLocalAdicMFFunction(),
SNESSetFunction(), SNESSetJacobian()

Level:intermediate
Location:
src/snes/utils/damgsnes.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex26.c.html
src/snes/examples/tutorials/ex5f.F.html