# PhasicFlow: timeControl Class Reference
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

timeControl Class Reference
Inheritance diagram for timeControl:
[legend]
Collaboration diagram for timeControl:
[legend]

## Public Member Functions

| timeControl (const dictionary &dict)
| timeControl (dictionary &dict, real startTime, real endTime, real saveInterval, word startTimeName)
virtual | ~timeControl ()=default
real | dt () const
real | setTime (real t)
void | setStopAt (real sT)
real | startTime () const
word | timeName () const
real | currentTime () const
word | currentTimeWord (bool forSave=true) const
int32 | currentIter () const
bool | finalTime () const
bool | reachedStopAt () const
bool | outputToFile () const
bool | timersReportTime () const
bool | sortTime () const
bool | setOutputToFile (real writeTime, const word &timeName)
bool | operator++ (int)
void | setSaveTimeFolder (bool saveToFile, const word &timeName="wrongTimeFolder")
int32 | timePrecision () const
timeInfo | TimeInfo () const

## Private Member Functions

void | checkForOutputToFile ()
bool | screenReport () const

## Private Attributes

real | dt_
real | startTime_
real | endTime_
real | stopAt_
real | currentTime_
real | saveInterval_
real | lastSaved_
int32 | currentIter_
int32 | timePrecision_
bool | managedExternaly_ = false
word | timeName_ = "wrongSettings"
real | writeTime_ = 0
realStridedRange | timersReportInterval_
Logical | performSorting_
realStridedRange | sortingInterval_
int32StridedRagne | screenReportInterval_ ={0,100}
bool | outputToFile_ = false

## Detailed Description

Definition at line 37 of file timeControl.hpp.

## Constructor & Destructor Documentation

## timeControl() [1/2]

timeControl | ( | const dictionary & | dict | ) |

explicit

Definition at line 32 of file timeControl.cpp.

## timeControl() [2/2]

timeControl | ( | dictionary & | dict,
|  | real | startTime,
|  | real | endTime,
|  | real | saveInterval,
|  | word | startTimeName
| ) |  |

Definition at line 78 of file timeControl.cpp.

References timeControl::checkForOutputToFile().

Here is the call graph for this function:

## ~timeControl()

virtual ~timeControl | ( |  | ) |

virtualdefault

## Member Function Documentation

## checkForOutputToFile()

void checkForOutputToFile | ( |  | ) |

private

Definition at line 151 of file timeControl.cpp.

References pFlow::abs(), pFlow::algorithms::KOKKOS::min(), and pFlow::pow().

Referenced by timeControl::timeControl().

Here is the call graph for this function:
Here is the caller graph for this function:

## screenReport()

bool screenReport | ( |  | ) | const

private

Definition at line 26 of file timeControl.cpp.

References timeControl::currentIter_, stridedRange< T >::isMember(), and timeControl::screenReportInterval_.

Here is the call graph for this function:

## dt()

real dt | ( |  | ) | const

inline

Definition at line 104 of file timeControl.hpp.

References timeControl::dt_.

## setTime()

pFlow::real setTime | ( | real | t | ) |

Definition at line 120 of file timeControl.cpp.

## setStopAt()

void setStopAt | ( | real | sT | ) |

inline

Definition at line 112 of file timeControl.hpp.

References timeControl::managedExternaly_, and timeControl::stopAt_.

## startTime()

real startTime | ( |  | ) | const

inline

Definition at line 120 of file timeControl.hpp.

References timeControl::startTime_.

## timeName()

pFlow::word timeName | ( |  | ) | const

Definition at line 129 of file timeControl.cpp.

Referenced by timeControl::setOutputToFile().

Here is the caller graph for this function:

## currentTime()

real currentTime | ( |  | ) | const

inline

Definition at line 127 of file timeControl.hpp.

References timeControl::currentTime_.

Referenced by pFlow::PFtoVTK::convertTimeFolderPointFields(), pFlow::PFtoVTK::convertTimeFolderPointFieldsSelected(), pFlow::TSFtoVTK::convertTimeFolderTriSurfaceFields(), and timeControl::currentTimeWord().

Here is the caller graph for this function:

## currentTimeWord()

word currentTimeWord | ( | bool | forSave = `true` | ) | const

inline

Definition at line 132 of file timeControl.hpp.

References timeControl::currentTime(), pFlow::real2FixedStripZeros(), and timeControl::timePrecision().

Here is the call graph for this function:

## currentIter()

int32 currentIter | ( |  | ) | const

inline

Definition at line 148 of file timeControl.hpp.

References timeControl::currentIter_.

Referenced by pointField< pFlow::VectorSingle, pFlow::AB3History >::updateBoundaries().

Here is the caller graph for this function:

## finalTime()

bool finalTime | ( |  | ) | const

Definition at line 137 of file timeControl.cpp.

References pFlow::abs().

Here is the call graph for this function:

## reachedStopAt()

bool reachedStopAt | ( |  | ) | const

Definition at line 144 of file timeControl.cpp.

References pFlow::abs().

Here is the call graph for this function:

## outputToFile()

bool outputToFile | ( |  | ) | const

inline

Definition at line 157 of file timeControl.hpp.

References timeControl::outputToFile_.

## timersReportTime()

bool timersReportTime | ( |  | ) | const

Definition at line 181 of file timeControl.cpp.

## sortTime()

bool sortTime | ( |  | ) | const

Definition at line 187 of file timeControl.cpp.

## setOutputToFile()

bool setOutputToFile | ( | real | writeTime,
|  | const word & | timeName
| ) |  |

inline

Definition at line 166 of file timeControl.hpp.

References timeControl::managedExternaly_, timeControl::timeName(), timeControl::timeName_, and timeControl::writeTime_.

Here is the call graph for this function:

## operator++()

bool operator++ | ( | int |  | ) |

Definition at line 203 of file timeControl.cpp.

References Cyan_Text, END_REPORT, and REPORT.

## setSaveTimeFolder()

void setSaveTimeFolder | ( | bool | saveToFile,
|  | const word & | timeName = `"wrongTimeFolder"`
| ) |  |

Definition at line 192 of file timeControl.cpp.

Referenced by systemControl::setSaveTimeFolder().

Here is the caller graph for this function:

## timePrecision()

int32 timePrecision | ( |  | ) | const

inline

Definition at line 182 of file timeControl.hpp.

References timeControl::timePrecision_.

Referenced by timeControl::currentTimeWord().

Here is the caller graph for this function:

## TimeInfo()

timeInfo TimeInfo | ( |  | ) | const

inline

Definition at line 188 of file timeControl.hpp.

References timeControl::currentIter_, timeControl::currentTime_, and timeControl::dt_.

## Member Data Documentation

## dt_

real dt_

private

Definition at line 45 of file timeControl.hpp.

Referenced by timeControl::dt(), and timeControl::TimeInfo().

## startTime_

real startTime_

private

Definition at line 48 of file timeControl.hpp.

Referenced by timeControl::startTime().

## endTime_

real endTime_

private

Definition at line 51 of file timeControl.hpp.

## stopAt_

real stopAt_

private

Definition at line 54 of file timeControl.hpp.

Referenced by timeControl::setStopAt().

## currentTime_

real currentTime_

private

Definition at line 57 of file timeControl.hpp.

Referenced by timeControl::currentTime(), and timeControl::TimeInfo().

## saveInterval_

real saveInterval_

private

Definition at line 60 of file timeControl.hpp.

## lastSaved_

real lastSaved_

private

Definition at line 63 of file timeControl.hpp.

## currentIter_

int32 currentIter_

private

Definition at line 66 of file timeControl.hpp.

Referenced by timeControl::currentIter(), timeControl::screenReport(), and timeControl::TimeInfo().

## timePrecision_

int32 timePrecision_

private

Definition at line 69 of file timeControl.hpp.

Referenced by timeControl::timePrecision().

## managedExternaly_

bool managedExternaly_ = false

private

Definition at line 71 of file timeControl.hpp.

Referenced by timeControl::setOutputToFile(), and timeControl::setStopAt().

## timeName_

word timeName_ = "wrongSettings"

private

Definition at line 73 of file timeControl.hpp.

Referenced by timeControl::setOutputToFile().

## writeTime_

real writeTime_ = 0

private

Definition at line 75 of file timeControl.hpp.

Referenced by timeControl::setOutputToFile().

## timersReportInterval_

realStridedRange timersReportInterval_

private

Definition at line 77 of file timeControl.hpp.

## performSorting_

Logical performSorting_

private

Definition at line 79 of file timeControl.hpp.

## sortingInterval_

realStridedRange sortingInterval_

private

Definition at line 81 of file timeControl.hpp.

## screenReportInterval_

int32StridedRagne screenReportInterval_ ={0,100}

private

Definition at line 83 of file timeControl.hpp.

Referenced by timeControl::screenReport().

## outputToFile_

bool outputToFile_ = false

private

Definition at line 85 of file timeControl.hpp.

Referenced by timeControl::outputToFile().

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

- src/phasicFlow/repository/Time/timeControl.hpp
- src/phasicFlow/repository/Time/timeControl.cpp