Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
RungeKutta4IvpOdeSolver Class Reference

#include <RungeKutta4IvpOdeSolver.hpp>

+ Inheritance diagram for RungeKutta4IvpOdeSolver:
+ Collaboration diagram for RungeKutta4IvpOdeSolver:

Protected Member Functions

void CalculateNextYValue (AbstractOdeSystem *pAbstractOdeSystem, double timeStep, double time, std::vector< double > &rCurrentYValues, std::vector< double > &rNextYValues)
 
- Protected Member Functions inherited from AbstractOneStepIvpOdeSolver
virtual void InternalSolve (AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rCurrentYValues, std::vector< double > &rWorkingMemory, double startTime, double endTime, double timeStep)
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

std::vector< doublek1
 
std::vector< doublek2
 
std::vector< doublek3
 
std::vector< doublek4
 
std::vector< doubleyki
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Public Member Functions inherited from AbstractOneStepIvpOdeSolver
virtual OdeSolution Solve (AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rYValues, double startTime, double endTime, double timeStep, double timeSampling)
 
virtual void Solve (AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rYValues, double startTime, double endTime, double timeStep)
 
virtual ~AbstractOneStepIvpOdeSolver ()
 
- Public Member Functions inherited from AbstractIvpOdeSolver
virtual void SolveAndUpdateStateVariable (AbstractOdeSystem *pAbstractOdeSystem, double startTime, double endTime, double timeStep)
 
bool StoppingEventOccurred ()
 
double GetStoppingTime ()
 
 AbstractIvpOdeSolver ()
 
virtual ~AbstractIvpOdeSolver ()
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 
- Protected Attributes inherited from AbstractIvpOdeSolver
bool mStoppingEventOccurred
 
double mStoppingTime
 

Detailed Description

A concrete one step ODE solver class that employs the Runge Kutta 4th order solver (RK4).

Definition at line 48 of file RungeKutta4IvpOdeSolver.hpp.

Member Function Documentation

◆ CalculateNextYValue()

void RungeKutta4IvpOdeSolver::CalculateNextYValue ( AbstractOdeSystem pAbstractOdeSystem,
double  timeStep,
double  time,
std::vector< double > &  rCurrentYValues,
std::vector< double > &  rNextYValues 
)
protectedvirtual

Calculate the solution to the ODE system at the next timestep.

Parameters
pAbstractOdeSystemthe ODE system to solve
timeStepdt
timethe current time
rCurrentYValuesthe current (initial) state
rNextYValuesthe state at the next timestep

Implements AbstractOneStepIvpOdeSolver.

Definition at line 38 of file RungeKutta4IvpOdeSolver.cpp.

References AbstractOdeSystem::EvaluateYDerivatives(), AbstractUntemplatedParameterisedSystem::GetNumberOfStateVariables(), k1, k2, k3, k4, and yki.

◆ serialize()

template<class Archive >
void RungeKutta4IvpOdeSolver::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the abstract IVP Solver, never used directly - boost uses this.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 61 of file RungeKutta4IvpOdeSolver.hpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 53 of file RungeKutta4IvpOdeSolver.hpp.

Member Data Documentation

◆ k1

std::vector<double> RungeKutta4IvpOdeSolver::k1
private

Working memory: expression k1 in the RK4 method.

Definition at line 86 of file RungeKutta4IvpOdeSolver.hpp.

Referenced by CalculateNextYValue().

◆ k2

std::vector<double> RungeKutta4IvpOdeSolver::k2
private

Working memory: expression k2 in the RK4 method.

Definition at line 87 of file RungeKutta4IvpOdeSolver.hpp.

Referenced by CalculateNextYValue().

◆ k3

std::vector<double> RungeKutta4IvpOdeSolver::k3
private

Working memory: expression k3 in the RK4 method.

Definition at line 88 of file RungeKutta4IvpOdeSolver.hpp.

Referenced by CalculateNextYValue().

◆ k4

std::vector<double> RungeKutta4IvpOdeSolver::k4
private

Working memory: expression k4 in the RK4 method.

Definition at line 89 of file RungeKutta4IvpOdeSolver.hpp.

Referenced by CalculateNextYValue().

◆ yki

std::vector<double> RungeKutta4IvpOdeSolver::yki
private

Working memory: expression yki in the RK4 method.

Definition at line 90 of file RungeKutta4IvpOdeSolver.hpp.

Referenced by CalculateNextYValue().


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