24 #ifndef __TIME_CONTROLLER_H__
25 #define __TIME_CONTROLLER_H__
61 virtual int solve() = 0;
142 void computeDtByCFL();
147 #endif // __TIME_CONTROLLER_H__
This time controller calculates the time stepping based on the CFL condition.
Definition: time_controller.h:113
std::ofstream debug
output information for debugging
Definition: time_controller.h:72
An abstract class for different types of simulation time controllers.
Definition: time_controller.h:50
std::size_t m_iWriteStep
The number of times results are written to the particle veiwer.
Definition: time_controller.h:70
An abstract class for classes that output simulations results.
Definition: particle_viewer.h:47
double m_fEndTime
End physical time of simulation.
Definition: time_controller.h:66
bool m_iIfDebug
if true then print debug info
Definition: time_controller.h:71
double m_fWriteTimeInterval
The physical time interval between two writting of results.
Definition: time_controller.h:67
double m_fDt
The physical time interval between two iterations of the simulation.
Definition: time_controller.h:69
std::vector< ParticleViewer * > m_vViewers
A vector containing pointers to different types of particle viewers.
Definition: time_controller.h:64
virtual int solve()
Calls main solvers of the simulation and determines the time stepping between iterations.
Definition: time_controller.cpp:67
An abstract class for the family of Lagrangian Particle solvers.
Definition: lp_solver.h:53
This class initializes the simulation.
Definition: initializer.h:227
double m_fTime
Current physical time of simulation.
Definition: time_controller.h:65
LPSolver * m_pSolver
A pointer to the Lagrangian Particle solver.
Definition: time_controller.h:63
DefaultTimeController(const Initializer &init, LPSolver *solver, const std::vector< ParticleViewer * > &viewers)
Constructor.
Definition: time_controller.cpp:45
virtual int solve()=0
Calls main solvers of the simulation and determines the time stepping between iterations.
bool adjustDtByWriteTimeInterval()
Adjusts the iteration time step when current time approaches the time for results writting...
Definition: time_controller.cpp:15
double m_fNextWriteTime
The next physical time point to write results.
Definition: time_controller.h:68