#include <source/solvers/packages/petsc/SNESAbstractFunctions.h>
Public Member Functions | |
SNESAbstractFunctions () | |
virtual | ~SNESAbstractFunctions () |
virtual int | evaluateNonlinearFunction (Vec xcur, Vec fcur)=0 |
virtual int | evaluateJacobian (Vec x)=0 |
virtual int | jacobianTimesVector (Vec x, Vec y)=0 |
virtual int | setupPreconditioner (Vec xcur)=0 |
virtual int | applyPreconditioner (Vec r, Vec z)=0 |
Class SNESAbstractFunctions is an abstract base class that declares the functions to be used with the PETSc SNES nonlinear solver package. This class works in cooperation with the SNES_SAMRAIContext class. To provide these functions to the PETSc SNES solver package, a subclass of this base class must be instantiated and be supplied to the SNES_SAMRAIContext constructor. Pointers to these functions will be stored in a SNES context and invoked from within the nonlinear solver. Note that the virtual members of this class are all protected. They should not be used outside of a subclass of this class.
|
Uninteresting constructor for SNESAbstractFunctions. |
|
Uninteresting destructor for SNESAbstractFunctions. |
|
User-supplied nonlinear function evaluation. Returns 0 if successful. Arguments:
|
|
Optional user-supplied routine to evaluate the Jacobian of the system. This function can be empty if the matrix-free option has been selected. Returns 0 if successful. Arguments:
|
|
Optional user-supplied Jacobian-vector product routine. This function can be empty if the matrix-free option has been selected. Returns 0 if successful. Arguments:
|
|
User-supplied preconditioner setup function. The setup function is called to provide matrix data for the subsequent call(s) to applyPreconditioner(). The integer return value is a flag indicating success if 0 is returned, and failure otherwise. Together setupPreconditioner() and applyPreconditioner() form a right preconditoner for the PETSc Krylov solver. Returns 0 if successful. |
|
User-supplied preconditioner solve function. This function must solve
|