Ignis
|
#include <solver_kinsol.h>
Public Member Functions | |
solver_kinsol (void *_user_data, const size_t _nvar, const std::vector< double > &_scales_v, const std::vector< double > &_scales_f, const std::vector< double > &_constraints, const int mu, const int ml, const double ftol=1E-5, const double stol=1E-5) | |
int | solve (int(*Func)(N_Vector, N_Vector, void *), std::vector< double > &y) |
~solver_kinsol () | |
Public Attributes | |
void * | user_data |
pointer to user data/functions | |
size_t | nvar |
number of variables being solved | |
SUNContext | sun |
sundials object | |
void * | kmem |
kinsol object | |
N_Vector | vars |
variables being solved | |
N_Vector | scales_v |
scales for variables being solved: f(v) | |
N_Vector | scales_f |
scales for functions being solved: f(v) | |
N_Vector | constraints |
constraints on the scalars (e.g., >0 etc.) | |
SUNMatrix | J |
Jacobian matrix. | |
SUNLinearSolver | LS |
linear solver | |
int | rv |
function return value | |
int | solver_type |
KIN_NONE, KIN_LINESEARCH, KIN_FP, KIN_PICARD. | |
int | exact_or_modified_newton |
1 or 0, respectively | |
Inferface class for KinSol solver for nonlinear systems of equations Header only
Definition at line 21 of file solver_kinsol.h.
|
inline |
Constructor function
_user_data | input/output: point to user's class object with data and functions needed to compute the rates |
_nvar | input: number of variables being solved |
_scales_v | input: scales for variables being solved: f(v) |
_scales_f | input: scales for functions being solved: f(v) |
_constraints | input: vector of constraints (if any) for variables (e.g., >0, etc.) |
mu | input: location of upper diagonal in the banded matrix for solution |
ml | input: location of lower diagonal in the banded matrix for solution |
ftol | input: function tolerance |
stol | input: scalar tolerance |
Definition at line 59 of file solver_kinsol.h.
|
inline |
Destructor, cleans up CVODE objects
Definition at line 140 of file solver_kinsol.h.
|
inline |
Main interface: solve the f(v)=0 system
Func | input: pointer to function defining the problem |
y | input/output: vector of variables being solved (and initial guess) |
Definition at line 109 of file solver_kinsol.h.
void* solver_kinsol::user_data |
pointer to user data/functions
Definition at line 27 of file solver_kinsol.h.
size_t solver_kinsol::nvar |
number of variables being solved
Definition at line 28 of file solver_kinsol.h.
SUNContext solver_kinsol::sun |
sundials object
Definition at line 30 of file solver_kinsol.h.
void* solver_kinsol::kmem |
kinsol object
Definition at line 31 of file solver_kinsol.h.
N_Vector solver_kinsol::vars |
variables being solved
Definition at line 32 of file solver_kinsol.h.
N_Vector solver_kinsol::scales_v |
scales for variables being solved: f(v)
Definition at line 33 of file solver_kinsol.h.
N_Vector solver_kinsol::scales_f |
scales for functions being solved: f(v)
Definition at line 34 of file solver_kinsol.h.
N_Vector solver_kinsol::constraints |
constraints on the scalars (e.g., >0 etc.)
Definition at line 35 of file solver_kinsol.h.
SUNMatrix solver_kinsol::J |
Jacobian matrix.
Definition at line 36 of file solver_kinsol.h.
SUNLinearSolver solver_kinsol::LS |
linear solver
Definition at line 37 of file solver_kinsol.h.
int solver_kinsol::rv |
function return value
Definition at line 38 of file solver_kinsol.h.
int solver_kinsol::solver_type |
KIN_NONE, KIN_LINESEARCH, KIN_FP, KIN_PICARD.
Definition at line 39 of file solver_kinsol.h.
int solver_kinsol::exact_or_modified_newton |
1 or 0, respectively
Definition at line 40 of file solver_kinsol.h.