Ignis
Loading...
Searching...
No Matches
integrator_cvode Class Reference

#include <integrator_cvode.h>

Public Member Functions

 integrator_cvode (int(*Func)(realtype, N_Vector, N_Vector, void *), void *_user_data, const int _nvar, const double _rtol, const std::vector< double > &_atol, const int mu, const int ml, std::vector< double > &y)
 
int integrate (std::vector< double > &y, const realtype dt)
 
 ~integrator_cvode ()
 

Public Attributes

SUNContext sun
 sundials object
 
void * cmem
 cvode object
 
N_Vector vars
 vector of variables being solved
 
N_Vector atol
 vector atol (absolute tolerance, for each variable)
 
realtype rtol
 scalar rtol (relative tolerance)
 
unsigned nvar
 number of equations being solved
 
SUNMatrix J
 matrix for linear solver
 
SUNLinearSolver LS
 linear solver
 
int rv
 return value: checking status of calls
 

Detailed Description

Inferface class for CVODE ODE integrator. Header only

Definition at line 19 of file integrator_cvode.h.

Constructor & Destructor Documentation

◆ integrator_cvode()

integrator_cvode::integrator_cvode ( int(*)(realtype, N_Vector, N_Vector, void *)  Func,
void *  _user_data,
const int  _nvar,
const double  _rtol,
const std::vector< double > &  _atol,
const int  mu,
const int  ml,
std::vector< double > &  y 
)
inline

Constructor function

Parameters
Funcinput: pointer to right-hand-side function (rates) for the problem being solved
_user_datainput/output: point to user's class object with data and functions needed to compute the rates
_nvarinput: number of variables being solved
_rtolinput: relative tolerance for all variables
_atolinput: vector of absolute tolerances for all variables
muinput: location of upper diagonal in the banded matrix for solution
mlinput: location of lower diagonal in the banded matrix for solution
yinput: initial condition of variables

Definition at line 51 of file integrator_cvode.h.

◆ ~integrator_cvode()

integrator_cvode::~integrator_cvode ( )
inline

Destructor, cleans up CVODE objects

Definition at line 113 of file integrator_cvode.h.

Member Function Documentation

◆ integrate()

int integrator_cvode::integrate ( std::vector< double > &  y,
const realtype  dt 
)
inline

Main interface: integrate the ODE system

Parameters
yinput/output: vector of variables being solved (and initial condition)
dtinput: time to intigrate for.

Definition at line 91 of file integrator_cvode.h.

Here is the caller graph for this function:

Member Data Documentation

◆ sun

SUNContext integrator_cvode::sun

sundials object

Definition at line 25 of file integrator_cvode.h.

◆ cmem

void* integrator_cvode::cmem

cvode object

Definition at line 26 of file integrator_cvode.h.

◆ vars

N_Vector integrator_cvode::vars

vector of variables being solved

Definition at line 27 of file integrator_cvode.h.

◆ atol

N_Vector integrator_cvode::atol

vector atol (absolute tolerance, for each variable)

Definition at line 28 of file integrator_cvode.h.

◆ rtol

realtype integrator_cvode::rtol

scalar rtol (relative tolerance)

Definition at line 29 of file integrator_cvode.h.

◆ nvar

unsigned integrator_cvode::nvar

number of equations being solved

Definition at line 30 of file integrator_cvode.h.

◆ J

SUNMatrix integrator_cvode::J

matrix for linear solver

Definition at line 31 of file integrator_cvode.h.

◆ LS

SUNLinearSolver integrator_cvode::LS

linear solver

Definition at line 32 of file integrator_cvode.h.

◆ rv

int integrator_cvode::rv

return value: checking status of calls

Definition at line 33 of file integrator_cvode.h.


The documentation for this class was generated from the following file: