Lagrangian Particle Code for The Simulation of 2D/3D Fluid Dynamics
|
This time controller calculates the time stepping based on the CFL condition. More...
#include <time_controller.h>
Public Member Functions | |
DefaultTimeController (const Initializer &init, LPSolver *solver, const std::vector< ParticleViewer * > &viewers) | |
Constructor. More... | |
virtual int | solve () |
Calls main solvers of the simulation and determines the time stepping between iterations. More... | |
Additional Inherited Members | |
![]() | |
bool | adjustDtByWriteTimeInterval () |
Adjusts the iteration time step when current time approaches the time for results writting. More... | |
![]() | |
LPSolver * | m_pSolver |
A pointer to the Lagrangian Particle solver. | |
std::vector< ParticleViewer * > | m_vViewers |
A vector containing pointers to different types of particle viewers. | |
double | m_fTime |
Current physical time of simulation. | |
double | m_fEndTime |
End physical time of simulation. | |
double | m_fWriteTimeInterval |
The physical time interval between two writting of results. | |
double | m_fNextWriteTime |
The next physical time point to write results. | |
double | m_fDt |
The physical time interval between two iterations of the simulation. | |
std::size_t | m_iWriteStep |
The number of times results are written to the particle veiwer. | |
bool | m_iIfDebug |
if true then print debug info | |
std::ofstream | debug |
output information for debugging | |
This time controller calculates the time stepping based on the CFL condition.
Co-author: Yu, Kwangmin (yukwa) on initial interface design ngmi n@gma il.c om
Created on: 2014/07/02
DefaultTimeController::DefaultTimeController | ( | const Initializer & | init, |
LPSolver * | solver, | ||
const std::vector< ParticleViewer * > & | viewers | ||
) |
Constructor.
The constructor initializes parameters based on and also initializes the main solver and viewer based on solver and used to perform the main iterations and to write results for viewing
[in] | init | Const reference to an object of the Initializer class |
[in] | solver | Pointer to an object of the LPSolver family |
[in] | viewers | Vector containing pointers to objects of the ParticleViewer family |
|
virtual |
Calls main solvers of the simulation and determines the time stepping between iterations.
The simulation is performed by calling the main LP solver for each iteration and the time length between iterations is determined by the CFL condition
None |
Implements TimeController.