Chaste Release::3.1
MockEulerIvpOdeSolver Class Reference

#include <MockEulerIvpOdeSolver.hpp>

Inheritance diagram for MockEulerIvpOdeSolver:
Collaboration diagram for MockEulerIvpOdeSolver:

List of all members.

Public Member Functions

 MockEulerIvpOdeSolver ()
unsigned GetCallCount ()
virtual ~MockEulerIvpOdeSolver ()

Protected Member Functions

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

unsigned mCallCount

Friends

class boost::serialization::access

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 ( )

Constructor.

Definition at line 38 of file MockEulerIvpOdeSolver.cpp.

virtual MockEulerIvpOdeSolver::~MockEulerIvpOdeSolver ( ) [inline, virtual]

Destructor.

Definition at line 109 of file MockEulerIvpOdeSolver.hpp.


Member Function Documentation

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.

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

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 mCallCount.

template<class Archive >
void MockEulerIvpOdeSolver::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

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

Parameters:
archive
version

Reimplemented from EulerIvpOdeSolver.

Definition at line 62 of file MockEulerIvpOdeSolver.hpp.

References mCallCount.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from EulerIvpOdeSolver.

Definition at line 54 of file MockEulerIvpOdeSolver.hpp.


Member Data Documentation

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: