Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
MockEulerIvpOdeSolver Class Reference

#include <MockEulerIvpOdeSolver.hpp>

+ Inheritance diagram for MockEulerIvpOdeSolver:
+ Collaboration diagram for MockEulerIvpOdeSolver:

Public Member Functions

 MockEulerIvpOdeSolver ()
 
unsigned GetCallCount ()
 
virtual ~MockEulerIvpOdeSolver ()
 
- Public Member Functions inherited from EulerIvpOdeSolver
 EulerIvpOdeSolver ()
 
virtual ~EulerIvpOdeSolver ()
 
- 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 Member Functions

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

Private Member Functions

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

Private Attributes

unsigned mCallCount
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from AbstractIvpOdeSolver
bool mStoppingEventOccurred
 
double mStoppingTime
 

Detailed Description

This 'mock' class is only used in testing. It is the same as the EulerIvpOdeSolver class, but also keeps a count of how many times it has been called. This is useful to check ODE solving has been parallelised correctly.

Definition at line 50 of file MockEulerIvpOdeSolver.hpp.

Constructor & Destructor Documentation

◆ MockEulerIvpOdeSolver()

MockEulerIvpOdeSolver::MockEulerIvpOdeSolver ( )

Constructor.

Definition at line 38 of file MockEulerIvpOdeSolver.cpp.

◆ ~MockEulerIvpOdeSolver()

virtual MockEulerIvpOdeSolver::~MockEulerIvpOdeSolver ( )
inlinevirtual

Destructor.

Definition at line 109 of file MockEulerIvpOdeSolver.hpp.

Member Function Documentation

◆ GetCallCount()

unsigned MockEulerIvpOdeSolver::GetCallCount ( )

Get the number of times the ODE solver has been called.

Returns
mCallCount.

Definition at line 44 of file MockEulerIvpOdeSolver.cpp.

References mCallCount.

◆ InternalSolve()

void MockEulerIvpOdeSolver::InternalSolve ( AbstractOdeSystem pAbstractOdeSystem,
std::vector< double > &  rCurrentYValues,
std::vector< double > &  rWorkingMemory,
double  startTime,
double  endTime,
double  timeStep 
)
protectedvirtual

Method that actually performs the solving on behalf of the public Solve methods.

Parameters
pAbstractOdeSystemthe ODE system to solve
rCurrentYValuesthe current (initial) state; results will also be returned in here
rWorkingMemoryworking memory; same size as rCurrentYValues
startTimeinitial time
endTimetime to solve to
timeStepdt

Reimplemented from AbstractOneStepIvpOdeSolver.

Definition at line 49 of file MockEulerIvpOdeSolver.cpp.

References AbstractOneStepIvpOdeSolver::InternalSolve(), and mCallCount.

◆ serialize()

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

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

Parameters
archive
version

Definition at line 62 of file MockEulerIvpOdeSolver.hpp.

References mCallCount.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 54 of file MockEulerIvpOdeSolver.hpp.

Member Data Documentation

◆ mCallCount

unsigned MockEulerIvpOdeSolver::mCallCount
private

How many times the ODE solver has been called.

Definition at line 70 of file MockEulerIvpOdeSolver.hpp.

Referenced by GetCallCount(), InternalSolve(), and serialize().


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