Class CVodeIntegrator#
Defined in File Integrator.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public Karana::Integrators::SundialsIntegrator(Class SundialsIntegrator)
Class Documentation#
-
class CVodeIntegrator : public Karana::Integrators::SundialsIntegrator#
The multistep CVode integrator from the SUNDIALS suite.
Public Functions
-
CVodeIntegrator(const IntegratorType &integrator_type, size_t nstates, DerivativeFunction f, const CVodeIntegrator::IntegratorOptions *options = nullptr)#
Constructor.
- Parameters:
nstates – The number of states to integrate.
f – The derivative function to calculate the derivative of the states.
integrator_type – The type of cvode integrator to use.
options – The integrator options.
-
virtual ~CVodeIntegrator()#
-
virtual const kc::ks_ptr<Integrator::IntegratorOptions> getOptions() const override#
Get the options associated with the integrator.
- Returns:
The options associated with the integrator.
-
virtual km::Vec getErrorContributions() const override#
Get the error contribution for each state.
- Returns:
A vector with the error contribution for each state.
Protected Functions
-
virtual void _initialize() final override#
Initialize the implementation-specific data structures.
-
virtual void _freeMemory() final override#
Free all memory, both common and implementation-specific. Must call _freeCommonMemory() to clear shared data structures.
-
virtual void _applyTolerances() final override#
Copy tolerances from internal options into implementation data structures.
-
virtual void _reInit() final override#
Reinitialize internal implementation state for a soft reset.
-
virtual void _advanceTo(double t_end) final override#
Advances implementation to a target time; called by parent class.
- Parameters:
t_end –
Protected Attributes
-
void *_cvode_mem#
Memory used by the cvode integrator.
-
kc::ks_ptr<CVodeIntegrator::IntegratorOptions> _opts#
CVode-specific integrator options.
-
struct IntegratorOptions : public Karana::Integrators::SundialsIntegrator::IntegratorOptions#
Struct with options for this integrator
-
CVodeIntegrator(const IntegratorType &integrator_type, size_t nstates, DerivativeFunction f, const CVodeIntegrator::IntegratorOptions *options = nullptr)#