#include <source/solvers/packages/pvode_trio/kinsol/wrapper/KINSOLAbstractFunctions.h>
Public Member Functions | |
KINSOLAbstractFunctions () | |
virtual | ~KINSOLAbstractFunctions () |
virtual void | evaluateNonlinearFunction (PVodeTrioAbstractVector *soln, PVodeTrioAbstractVector *fval)=0 |
virtual int | precondSetup (PVodeTrioAbstractVector *soln, PVodeTrioAbstractVector *soln_scale, PVodeTrioAbstractVector *fval, PVodeTrioAbstractVector *fval_scale, PVodeTrioAbstractVector *vtemp1, PVodeTrioAbstractVector *vtemp2, double mach_roundoff, int &num_feval)=0 |
virtual int | precondSolve (PVodeTrioAbstractVector *soln, PVodeTrioAbstractVector *soln_scale, PVodeTrioAbstractVector *fval, PVodeTrioAbstractVector *fval_scale, PVodeTrioAbstractVector *rhs, PVodeTrioAbstractVector *vtemp, double mach_roundoff, int &num_feval)=0 |
virtual int | jacobianTimesVector (PVodeTrioAbstractVector *vector, PVodeTrioAbstractVector *product, const bool soln_changed, PVodeTrioAbstractVector *soln)=0 |
KINSOL only requires that the function evaluateNonlinearFunction() be supplied. The other virtual functions are optional in KINSOL. Note that the use of the optional functions may be turned on and off via boolean arguments to the constructor of the KINSOLSolver class, or using the setKINSOLFunctions() member function of that class.
|
Uninteresting constructor destructor for KINSOLAbstractFunctions. |
|
|
|
User-supplied nonlinear residual function evaluation. The function arguments are:
IMPORTANT: This function must not modify the vector soln. |
|
User-supplied preconditioner setup function. The setup function is called to provide matrix data for the subsequent call(s) to precondSolve(). That is, this preconditioner setup function is used to evaluate and preprocess any Jacobian-related data needed by the preconditioner solve function. The integer return value is a flag indicating success if 0 is returned, and failure otherwise. If a non-zero value is returned, KINSOL stops. Together precondSetup() and precondSolve() form a right preconditoner for the KINSOL Krylov solver. This function will not be called prior to every call of precondSolve(), but instead will be called only as often as needed to achieve convergence within the Newton iteration. The function arguments are:
The scaling vectors are provided for possible use in approximating Jacobian data; e.g., uing difference quotients. The IMPORTANT: This function must not modify the vector arguments. |
|
User-supplied preconditioner solve function. This function must solve The function arguments are:
IMPORTANT: This function must not modify soln, fval, or the scaling vectors. |
|
Optional user-supplied A times x routine, where A is an approximation to the Jacobian matrix and v is some vector. product = (A * vector) is computed. The function arguments are:
IMPORTANT: This function must not modify soln vector. |