Chaste  Release::2017.1
StepSizeException Class Reference

#include <StepSizeException.hpp>

+ Inheritance diagram for StepSizeException:
+ Collaboration diagram for StepSizeException:

Public Member Functions

 StepSizeException (double suggestedNewStep, const std::string message, bool isTerminal)
 
virtual const char * what () const throw ()
 
 ~StepSizeException () throw ()
 
double GetSuggestedNewStep ()
 
bool IsTerminal ()
 

Private Attributes

double mSuggestedNewStep
 
const std::string mMessage
 
bool mIsTerminal
 

Detailed Description

Exception class to handle the adaptive time stepping in off-lattice simulations.

We use this object since we are using it to signal to parent code that it needs to adapt the time step, rather than being an error for presentation to the user (for which we would use an Exception object).

Definition at line 46 of file StepSizeException.hpp.

Constructor & Destructor Documentation

StepSizeException::StepSizeException ( double  suggestedNewStep,
const std::string  message,
bool  isTerminal 
)
inline

Construct an exception with a message string.

Parameters
suggestedNewStepa suggestion for an updated timestep
messagethe error message to display
isTerminalwhether the error is terminal if true the the simulation stops

Definition at line 68 of file StepSizeException.hpp.

StepSizeException::~StepSizeException ( )
throw (
)
inline

Destructor.

Definition at line 86 of file StepSizeException.hpp.

Member Function Documentation

double StepSizeException::GetSuggestedNewStep ( )
inline
Returns
mSuggestedNewStep.

Definition at line 91 of file StepSizeException.hpp.

References mSuggestedNewStep.

Referenced by OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateCellLocationsAndTopology().

bool StepSizeException::IsTerminal ( )
inline
Returns
mIsTerminal.

Definition at line 99 of file StepSizeException.hpp.

References mIsTerminal.

Referenced by AbstractNumericalMethod< ELEMENT_DIM, SPACE_DIM >::DetectStepSizeExceptions().

virtual const char* StepSizeException::what ( ) const
throw (
)
inlinevirtual

Overidden what() method to return the message specific to this error handler.

Returns
the exception message

Definition at line 81 of file StepSizeException.hpp.

Referenced by AbstractNumericalMethod< ELEMENT_DIM, SPACE_DIM >::DetectStepSizeExceptions(), and OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateCellLocationsAndTopology().

Member Data Documentation

bool StepSizeException::mIsTerminal
private

Whether or not to terminate the simulation.

Definition at line 57 of file StepSizeException.hpp.

Referenced by IsTerminal().

const std::string StepSizeException::mMessage
private

Error message.

Definition at line 54 of file StepSizeException.hpp.

double StepSizeException::mSuggestedNewStep
private

A suggested new time step.

Definition at line 51 of file StepSizeException.hpp.

Referenced by GetSuggestedNewStep().


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