Public Member Functions | List of all members
SafeTimeTermination Class Reference

Terminates the simulation after a certain time was reached. More...

#include <main_loop_2d.hpp>

Inheritance diagram for SafeTimeTermination:
Inheritance graph
[legend]
Collaboration diagram for SafeTimeTermination:
Collaboration graph
[legend]

Public Member Functions

 SafeTimeTermination (double termination_time, int max_cycles)
 Class constructor. More...
 
bool operator() (const hdsim &sim)
 Returns true if the simulation should continue, false otherwise. More...
 
- Public Member Functions inherited from TerminationCondition
virtual ~TerminationCondition (void)
 Virtual destructor.
 

Detailed Description

Terminates the simulation after a certain time was reached.

Definition at line 76 of file main_loop_2d.hpp.

Constructor & Destructor Documentation

◆ SafeTimeTermination()

SafeTimeTermination::SafeTimeTermination ( double  termination_time,
int  max_cycles 
)

Class constructor.

Parameters
termination_timeThe simulation is advanced until that time is reached
max_cyclesUpper limit on the number of time advance cycles. An error is thrown if this number is exceeded.

Definition at line 20 of file main_loop_2d.cpp.

Here is the caller graph for this function:

Member Function Documentation

◆ operator()()

bool SafeTimeTermination::operator() ( const hdsim &  sim)
virtual

Returns true if the simulation should continue, false otherwise.

Parameters
simHydrodynamic simulation
Returns
True is simulation should continue running

Implements TerminationCondition.

Definition at line 25 of file main_loop_2d.cpp.

Here is the call graph for this function:

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