Chaste  Release::2018.1
PdeSimulationTime Class Reference

#include <PdeSimulationTime.hpp>

+ Collaboration diagram for PdeSimulationTime:

Static Public Member Functions

static void SetTime (double time)
 
static double GetTime ()
 
static void SetPdeTimeStepAndNextTime (double timestep, double next_time)
 
static double GetPdeTimeStep ()
 
static double GetNextTime ()
 
static double GetPdeTimeStepInverse ()
 

Static Private Attributes

static double mTime
 
static double mPdeTimeStep
 
static double mNextTime
 
static double mPdeTimeStepInverse
 

Detailed Description

Todo:
Integrate with other time stepping classes or remove? A small convenience class providing a consistent global time to the PDE solver classes.

This isn't technically a singleton, as it's implemented with static data and methods.

Definition at line 47 of file PdeSimulationTime.hpp.

Member Function Documentation

void PdeSimulationTime::SetPdeTimeStepAndNextTime ( double  timestep,
double  next_time 
)
static

Set the current PDE timestep.

The method checks that next_time ~= mTime + timestep

Parameters
timestepthe current timestep
next_timethe next time (as given by the PDE time stepper).

Definition at line 56 of file PdeSimulationTime.cpp.

References mNextTime, mPdeTimeStep, mPdeTimeStepInverse, and mTime.

Referenced by AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

void PdeSimulationTime::SetTime ( double  time)
static

Set the current time.

Parameters
timethe current time

Definition at line 46 of file PdeSimulationTime.cpp.

References mTime.

Referenced by AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

Member Data Documentation

double PdeSimulationTime::mNextTime
staticprivate

The next time (from the original PDE time-stepper). mNextTime ~= mTime + mPdeTimeStep. Note that this is stored explicitly because if we do the addition then the answer will be off by mTime*DBL_EPSILON.

Definition at line 92 of file PdeSimulationTime.hpp.

Referenced by GetNextTime(), and SetPdeTimeStepAndNextTime().

double PdeSimulationTime::mPdeTimeStep
staticprivate

The timestep used in the PDE solve.

Definition at line 85 of file PdeSimulationTime.hpp.

Referenced by GetPdeTimeStep(), and SetPdeTimeStepAndNextTime().

double PdeSimulationTime::mPdeTimeStepInverse
staticprivate

1/dt.

Definition at line 95 of file PdeSimulationTime.hpp.

Referenced by GetPdeTimeStepInverse(), and SetPdeTimeStepAndNextTime().

double PdeSimulationTime::mTime
staticprivate

The current time.

Definition at line 82 of file PdeSimulationTime.hpp.

Referenced by GetTime(), SetPdeTimeStepAndNextTime(), and SetTime().


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