Ember
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Integrator Class Referenceabstract

Abstract base class for an ODE integrator that can integrate instances of class ODE. More...

#include <integrator.h>

Inheritance diagram for Integrator:
[legend]

Public Member Functions

 Integrator ()
 
virtual ~Integrator ()
 
virtual void set_y0 (const dvec &y0)
 Set the initial condition for the problem.
 
virtual void initialize (const double t0, const double h)
 Set up parameters and problem-dependent data structures for the solver.
 
double get_h () const
 Get the last step size used.
 
double get_t () const
 Get the current time reached by the integrator.
 
virtual const dvecget_y () const
 Get the current state vector.
 
virtual const dvecget_ydot ()=0
 Get the time derivative of the current state vector.
 
virtual void step ()=0
 Take a single step using the current step size.
 
virtual void integrateToTime (double tEnd)
 Take as many steps as necessary to reach tEnd without stepping past it.
 

Public Attributes

dvec y
 solution vector
 
dvec ydot
 derivative of state vector
 
double t
 current time
 

Protected Attributes

double h
 timestep
 
size_t N
 Dimension of y.
 

Detailed Description

Abstract base class for an ODE integrator that can integrate instances of class ODE.

Constructor & Destructor Documentation

◆ Integrator()

Integrator::Integrator ( )

◆ ~Integrator()

virtual Integrator::~Integrator ( )
inlinevirtual

Member Function Documentation

◆ set_y0()

void Integrator::set_y0 ( const dvec y0)
virtual

Set the initial condition for the problem.

Must be called before starting integration.

Reimplemented in ExplicitIntegrator, and TridiagonalIntegrator.

◆ initialize()

void Integrator::initialize ( const double  t0,
const double  h 
)
virtual

Set up parameters and problem-dependent data structures for the solver.

Must be called before starting integration.

Parameters
t0Start time for the integration
hinitial step size

Reimplemented in TridiagonalIntegrator.

◆ get_h()

double Integrator::get_h ( ) const

Get the last step size used.

◆ get_t()

double Integrator::get_t ( ) const

Get the current time reached by the integrator.

◆ get_y()

const dvec & Integrator::get_y ( ) const
virtual

Get the current state vector.

◆ get_ydot()

virtual const dvec & Integrator::get_ydot ( )
pure virtual

Get the time derivative of the current state vector.

Implemented in ExplicitIntegrator, and TridiagonalIntegrator.

◆ step()

virtual void Integrator::step ( )
pure virtual

Take a single step using the current step size.

Implemented in ExplicitIntegrator, and TridiagonalIntegrator.

◆ integrateToTime()

void Integrator::integrateToTime ( double  tEnd)
virtual

Take as many steps as necessary to reach tEnd without stepping past it.

Member Data Documentation

◆ y

dvec Integrator::y

solution vector

◆ ydot

dvec Integrator::ydot

derivative of state vector

◆ t

double Integrator::t

current time

◆ h

double Integrator::h
protected

timestep

◆ N

size_t Integrator::N
protected

Dimension of y.


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