SAMRAI::solv::SNESAbstractFunctions Class Reference

Abstract base class that declares the functions to be used with the PETSc SNES nonlinear solver package. More...

#include <source/solvers/packages/petsc/SNESAbstractFunctions.h>

List of all members.

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


Detailed Description

Abstract base class that declares the functions to be used with the PETSc SNES nonlinear solver package.

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.

See also:
solv::SNES_SAMRAIContext


Constructor & Destructor Documentation

SAMRAI::solv::SNESAbstractFunctions::SNESAbstractFunctions (  ) 

Uninteresting constructor for SNESAbstractFunctions.

SAMRAI::solv::SNESAbstractFunctions::~SNESAbstractFunctions (  )  [virtual]

Uninteresting destructor for SNESAbstractFunctions.


Member Function Documentation

virtual int SAMRAI::solv::SNESAbstractFunctions::evaluateNonlinearFunction ( Vec  xcur,
Vec  fcur 
) [pure virtual]

User-supplied nonlinear function evaluation. Returns 0 if successful. Arguments:

Parameters:
xcur (IN) the current iterate for the nonlinear system
fcur (OUT) current function value
IMPORTANT: This function must not modify xcur.

virtual int SAMRAI::solv::SNESAbstractFunctions::evaluateJacobian ( Vec  x  )  [pure virtual]

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:

Parameters:
x (IN) current Newton iterate.
IMPORTANT: This function must not modify x.

virtual int SAMRAI::solv::SNESAbstractFunctions::jacobianTimesVector ( Vec  x,
Vec  y 
) [pure virtual]

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:

Parameters:
x (IN) vector to be multiplied by the Jacobian.
y (OUT) the product of the Jacobian and vector
IMPORTANT: This function must not modify x.

virtual int SAMRAI::solv::SNESAbstractFunctions::setupPreconditioner ( Vec  xcur  )  [pure virtual]

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.

virtual int SAMRAI::solv::SNESAbstractFunctions::applyPreconditioner ( Vec  r,
Vec  z 
) [pure virtual]

User-supplied preconditioner solve function. This function must solve $M z = r$, where $M$ is the right preconditioner matrix formed by setupPreconditioner(). The integer return value is a flag indicating success if 0 is returned, and failure otherwise. Arguments:

Parameters:
r (IN) right-hand side of preconditioning system
z (OUT) result of applying preconditioner to right-hand side
IMPORTANT: This function must not modify r.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:56 2009 for SAMRAI by  doxygen 1.5.1