Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
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::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::~StepSizeException ( )
throw (
)
inline

Destructor.

Definition at line 86 of file StepSizeException.hpp.

Member Function Documentation

◆ GetSuggestedNewStep()

double StepSizeException::GetSuggestedNewStep ( )
inline
Returns
mSuggestedNewStep.

Definition at line 91 of file StepSizeException.hpp.

References mSuggestedNewStep.

◆ IsTerminal()

bool StepSizeException::IsTerminal ( )
inline
Returns
mIsTerminal.

Definition at line 99 of file StepSizeException.hpp.

References mIsTerminal.

◆ what()

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.

References mMessage.

Member Data Documentation

◆ mIsTerminal

bool StepSizeException::mIsTerminal
private

Whether or not to terminate the simulation.

Definition at line 57 of file StepSizeException.hpp.

Referenced by IsTerminal().

◆ mMessage

const std::string StepSizeException::mMessage
private

Error message.

Definition at line 54 of file StepSizeException.hpp.

Referenced by what().

◆ mSuggestedNewStep

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: