|
waLBerla 7.2
|
Handles the execution of subcycles in a timeloop to allow for finer grained time steps than the LBM ones.
Supports registration of functions that are run before, during or after a subcycle. The SubCyclingManager itself has to be added to a parent (LBM) time loop, and will execute the functions registered for execution during the subcycling procedure numberOfSubCycles times.
#include <SubCyclingManager.h>
Public Types | |
| using | VoidVoidFunc = std::function<void ()> |
Public Member Functions | |
Construction & Destruction | |
| SubCyclingManager (size_t numberOfSubCycles, shared_ptr< WcTimingPool > timingPool=nullptr) | |
| virtual | ~SubCyclingManager ()=default |
Execution Functions | |
| void | operator() () |
Registration Functions | |
| using | FuncHandle = size_t |
| FuncHandle | addFuncBeforeSubCycles (const VoidVoidFunc &f, const std::string &identifier="Other") |
| FuncHandle | addFuncDuringSubCycles (const VoidVoidFunc &f, const std::string &identifier="Other") |
| FuncHandle | addFuncAfterSubCycles (const VoidVoidFunc &f, const std::string &identifier="Other") |
Bookkeeping Functions | |
| using | IdentifiedFunc = std::pair<std::string, VoidVoidFunc> |
| size_t | numberOfSubCycles_ |
| shared_ptr< WcTimingPool > | timingPool_ |
| uint_t | currentTimeStep_ {0} |
| std::vector< IdentifiedFunc > | beforeFunctions_ |
| std::vector< IdentifiedFunc > | duringFunctions_ |
| std::vector< IdentifiedFunc > | afterFunctions_ |
| uint_t | getCurrentTimeStep () const |
| void | setCurrentTimeStep (uint_t timestep) |
| void | executeBeforeFunctions () |
| void | executeDuringFunctions () |
| void | executeAfterFunctions () |
| void | executeFunctions (std::vector< IdentifiedFunc > &functions) |
| void | startTiming (const std::string &name) |
| void | stopTiming (const std::string &name) |
|
private |
| using walberla::lbm_mesapd_coupling::SubCyclingManager::VoidVoidFunc = std::function<void ()> |
|
explicit |
|
virtualdefault |
| SubCyclingManager::FuncHandle walberla::lbm_mesapd_coupling::SubCyclingManager::addFuncAfterSubCycles | ( | const VoidVoidFunc & | f, |
| const std::string & | identifier = "Other" ) |
| SubCyclingManager::FuncHandle walberla::lbm_mesapd_coupling::SubCyclingManager::addFuncBeforeSubCycles | ( | const VoidVoidFunc & | f, |
| const std::string & | identifier = "Other" ) |
| SubCyclingManager::FuncHandle walberla::lbm_mesapd_coupling::SubCyclingManager::addFuncDuringSubCycles | ( | const VoidVoidFunc & | f, |
| const std::string & | identifier = "Other" ) |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
| void walberla::lbm_mesapd_coupling::SubCyclingManager::operator() | ( | ) |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |