32 template <MInt nDim,
class ppType>
131 TERMM(-1,
"getDimensionalizationParams()");
142 <<
" from " << loc << std::endl;
155 TERMM(1,
"Not implemented for this solver");
160 TERMM(1,
"Not implemented for this solver");
167 std::vector<MInt>& NotUsed(noSamplingVars),
168 std::vector<std::vector<MString>>& NotUsed(samplingVarNames),
169 const MString NotUsed(featureName) =
"") {
170 TERMM(1,
"Not implemented for this solver");
173 const std::vector<MInt>& NotUsed(noSamplingVars)) {
174 TERMM(1,
"Not implemented for this solver");
178 TERMM(1,
"Not implemented for this solver");
181 const MInt NotUsed(sampleVarId),
MFloat* NotUsed(state),
182 const MBool NotUsed(interpolate) =
false) {
183 TERMM(1,
"Not implemented for this solver");
188 virtual void balance(
const MInt*
const NotUsed(noCellsToReceiveByDomain),
189 const MInt*
const NotUsed(noCellsToSendByDomain),
190 const MInt*
const NotUsed(targetDomainsByCell),
191 const MInt NotUsed(oldNoCells)) {
192 TERMM(1,
"Not implemented for this solver");
197 virtual void balancePre() { TERMM(1,
"Not implemented for this solver"); };
198 virtual void balancePost() { TERMM(1,
"Not implemented for this solver"); };
213 TERMM(1,
"Not implemented for this solver");
242 const MInt*
const NotUsed(bufferIdToCellId),
MInt*
const NotUsed(data)) {
243 TERMM(1,
"Not implemented for solver.");
246 const MInt*
const NotUsed(bufferIdToCellId),
MLong*
const NotUsed(data)) {
247 TERMM(1,
"Not implemented for solver.");
250 const MInt*
const NotUsed(bufferIdToCellId),
MFloat*
const NotUsed(data)) {
251 TERMM(1,
"Not implemented for solver.");
254 TERMM(1,
"Not implemented for solver.");
257 TERMM(1,
"Not implemented for solver.");
260 TERMM(1,
"Not implemented for solver.");
265 std::vector<MInt>& NotUsed(globalIntVars)){
273 std::vector<MInt>& NotUsed(globalIdVars)){
307 virtual void getSolverTimings(std::vector<std::pair<MString, MFloat>>& NotUsed(solverTimings),
308 const MBool NotUsed(allTimings)) {
309 TERMM(1,
"not implemented in base class");
313 TERMM(1,
"not implemented for solver");
318 TERMM(1,
"m_dlbTimerId already set");
326 std::vector<std::bitset<64>>& , std::vector<MInt>& ) {
327 TERMM(1,
"Not implemented for this solver");
338 virtual void setSensors(std::vector<std::vector<MFloat>>&, std::vector<MFloat>&, std::vector<std::bitset<64>>&,
339 std::vector<MInt>&) {
340 TERMM(1,
"Not implemented for this solver");
353 virtual void refineCell(
const MInt ) { TERMM(1,
"Not implemented for this solver"); };
359 virtual void removeCell(
const MInt ) { TERMM(1,
"Not implemented for this solver"); };
362 virtual void swapCells(
const MInt ,
const MInt ) { TERMM(1,
"Not implemented for this solver"); };
365 virtual void swapProxy(
const MInt ,
const MInt ) { TERMM(1,
"Not implemented for this solver"); };
371 virtual void resizeGridMap() { TERMM(1,
"Not implemented for this solver"); };
392 TERMM(1,
"Not implemented for solver!");
446 const MBool NotUsed(finalTimeStep) =
false) = 0;
460 TERMM(-1,
"Empty body of Solver::getInterpolatedVariables()");
463 virtual void loadRestartFile() { TERMM(-1,
"Empty body of Solver::loadRestartFile()"); };
466 TERMM(-1,
"Empty body of Solver::determineRestartTimeStep()");
474 TERMM(-1,
"Empty body of Solver::writeRestartFile()");
477 virtual void setTimeStep() { TERMM(-1,
"Empty body of Solver::setTimeStep()"); };
479 virtual void implicitTimeStep() { TERMM(-1,
"Empty body of Solver::implicitTimeStep()"); };
Manages the initialisation of the solvers, the methods depending to the solvers and the start of the ...
void stopIdleTimer(const MInt dlbTimerId, const MString &name)
Stop the idle timer for the given DLB timer id.
void startIdleTimer(const MInt dlbTimerId, const MString &name)
Start the idle timer for the given DLB timer id.
void startLoadTimer(const MInt dlbTimerId, const MString &name)
Start the load timer for the given DLB timer id.
MInt noSubTimers() const
Return the number of (sub-)timers for each DLB timer.
MFloat returnLoadRecord(const MInt dlbTimerId, const MInt mode=0)
Return the load record of a DLB timer.
void stopLoadTimer(const MInt dlbTimerId, const MString &name)
Stop the load timer for the given DLB timer id.
void enableDlbTimers(const MInt dlbTimerId)
Enable the given DLB timer.
void reEnableDlbTimer(const MInt dlbTimerId)
void disableDlbTimers(const MInt dlbTimerId)
Disable the given DLB timer.
MFloat returnIdleRecord(const MInt dlbTimerId, const MInt mode=0)
Return the idle record of a DLB timer.
MBool dlbTimersEnabled(const MInt dlbTimerId)
Return if the given DLB timer is enabled.
MBool isLoadTimerRunning(const MInt dlbTimerId)
Parent class of all solvers This class is the base for all solvers. I.e. all solver class (e....
virtual void finalizeBalance()
virtual void removeCell(const MInt)
Remove the given cell.
virtual void getInterpolatedVariables(MInt, const MFloat *, MFloat *)
MInt readSolverSamplingVarNames(std::vector< MString > &varNames, const MString featureName="") const
Read sampling variables names, store in vector and return the number of sampling variables.
virtual void prepareAdaptation(std::vector< std::vector< MFloat > > &, std::vector< MFloat > &, std::vector< std::bitset< 64 > > &, std::vector< MInt > &)
virtual void resetSolver()
Reset the solver/solver for load balancing.
virtual void balance(const MInt *const NotUsed(noCellsToReceiveByDomain), const MInt *const NotUsed(noCellsToSendByDomain), const MInt *const NotUsed(targetDomainsByCell), const MInt NotUsed(oldNoCells))
Perform load balancing.
MBool m_initFromRestartFile
virtual void preTimeStep()=0
virtual void writeRestartFile(const MBool, const MBool, const MString, MInt *)
virtual void saveCoarseSolution()
virtual MBool solutionStep()
virtual MInt noSolverTimers(const MBool NotUsed(allTimings))
virtual void getDimensionalizationParams(std::vector< std::pair< MFloat, MString > > &) const
Return the dimensionalization parameters of this solver.
MBool isLoadTimerRunning()
virtual void finalizeInitSolver()=0
virtual MInt noLoadTypes() const
MString outputDir() const
Return the directory for output files.
virtual void prepareNextTimeStep()
MBool getSolverStatus()
Get the solver status indicating if the solver is currently active in the execution recipe.
virtual void balancePost()
virtual void reIntAfterRestart(MBool)
MFloat returnIdleRecord() const
virtual void setCellDataDlb(const MInt NotUsed(dataId), const MFloat *const NotUsed(data))
void stopIdleTimer(const MString &name)
virtual void calcSamplingVariables(const std::vector< MInt > &NotUsed(varIds), const MBool NotUsed(exchange))
virtual void setTimeStep()
virtual void writeRestartFile(MBool)
MString solverMethod() const
Return the solverMethod of this solver.
virtual void getSolverTimings(std::vector< std::pair< MString, MFloat > > &NotUsed(solverTimings), const MBool NotUsed(allTimings))
virtual MFloat & a_slope(const MInt, MInt const, const MInt)
virtual void initSolver()=0
virtual MBool prepareRestart(MBool, MBool &)
Prepare the solvers for a grid-restart.
virtual void finalizeAdaptation()
finalize adaptation for split sadptation after the adaptation loop
void setDlbTimer(const MInt timerId)
virtual void setGlobalSolverVars(std::vector< MFloat > &NotUsed(globalFloatVars), std::vector< MInt > &NotUsed(globalIdVars))
static std::map< MInt, MString > m_aliases
virtual MFloat time() const =0
Return the time.
void startIdleTimer(const MString &name)
std::set< MInt > m_solutionTimeSteps
virtual void getSolverSamplingProperties(std::vector< MInt > &NotUsed(samplingVarIds), std::vector< MInt > &NotUsed(noSamplingVars), std::vector< std::vector< MString > > &NotUsed(samplingVarNames), const MString NotUsed(featureName)="")
MInt restartTimeStep() const
Return the restart interval of this solver.
virtual MInt domainId() const
Return the domainId (rank)
void startLoadTimer(const MString name)
virtual MInt cellDataSizeDlb(const MInt NotUsed(dataId), const MInt NotUsed(cellId))
virtual MBool isActive() const
MPI_Comm mpiComm() const
Return the MPI communicator used by this solver.
virtual void implicitTimeStep()
virtual void removeChilds(const MInt)
Coarsen the given cell.
virtual MInt noVariables() const
Return the number of variables.
virtual void saveSolverSolution(const MBool NotUsed(forceOutput)=false, const MBool NotUsed(finalTimeStep)=false)=0
virtual void postAdaptation()
post adaptation for split adaptation within the adaptation loop
virtual void loadRestartFile()
virtual void resizeGridMap()
Swap the given cells.
MFloat * m_outerBandWidth
virtual MFloat getCellLoad(const MInt NotUsed(cellId), const MFloat *const NotUsed(weights)) const
MInt solverId() const
Return the solverId.
virtual void saveSensorData(const std::vector< std::vector< MFloat > > &, const MInt &, const MString &, const MInt *const)
virtual MBool forceAdaptation()
virtual MInt getCurrentTimeStep() const
virtual void getCellDataDlb(const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MFloat *const NotUsed(data))
MBool m_useNonSpecifiedRestartFile
virtual void preSolutionStep(MInt)
virtual void getGlobalSolverVars(std::vector< MFloat > &NotUsed(globalFloatVars), std::vector< MInt > &NotUsed(globalIntVars))
virtual void initSolverSamplingVariables(const std::vector< MInt > &NotUsed(varIds), const std::vector< MInt > &NotUsed(noSamplingVars))
virtual ~Solver()=default
virtual void reinitAfterAdaptation()
virtual MBool a_isBndryGhostCell(MInt) const
MFloat * m_innerBandWidth
std::set< MInt > m_freeIndices
MInt m_restartInterval
The number of timesteps before writing the next restart file.
virtual MInt noInternalCells() const =0
Return the number of internal cells within this solver.
virtual void balancePre()
MString getIdentifier(const MBool useSolverId=false, const MString preString="", const MString postString="_")
virtual void postTimeStep()=0
virtual void setCellWeights(MFloat *)
Set cell weights.
virtual void accessSampleVariables(MInt, MFloat *&)
virtual void getLoadQuantities(MInt *const NotUsed(loadQuantities)) const
virtual void localToGlobalIds()
MString testcaseDir() const
Return the testcase directory.
MInt m_residualInterval
The number of timesteps before writing the next residual.
virtual void getCellDataDlb(const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MInt *const NotUsed(data))
MInt restartInterval() const
Return the restart interval of this solver.
virtual void cancelMpiRequests()
Cancel open mpi (receive) requests in the solver (e.g. due to interleaved execution)
virtual void setCellDataDlb(const MInt NotUsed(dataId), const MLong *const NotUsed(data))
virtual void swapCells(const MInt, const MInt)
Swap the given cells.
const MInt m_solverId
a unique solver identifier
virtual MInt cellDataTypeDlb(const MInt NotUsed(dataId)) const
virtual MBool solverConverged()
virtual MInt noDomains() const
virtual MInt noCellDataDlb() const
Methods to inquire solver data information.
virtual void setCellDataDlb(const MInt NotUsed(dataId), const MInt *const NotUsed(data))
virtual void getDomainDecompositionInformation(std::vector< std::pair< MString, MInt > > &NotUsed(domainInfo))
virtual void getSampleVariableNames(std::vector< MString > &NotUsed(varNames))
void stopLoadTimer(const MString &name)
virtual void refineCell(const MInt)
Refine the given cell.
virtual void getCellDataDlb(const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MLong *const NotUsed(data))
virtual void limitWeights(MFloat *NotUsed(weights))
void updateDomainInfo(const MInt domainId, const MInt noDomains, const MPI_Comm mpiComm, const MString &loc)
Set new domain information.
virtual void globalToLocalIds()
virtual MBool a_isBndryCell(const MInt) const
virtual void prepareAdaptation()
prepare adaptation for split adaptation before the adaptation loop
MInt m_solutionInterval
The number of timesteps before writing the next solution file.
MString restartDir() const
Return the directory for restart files.
virtual void swapProxy(const MInt, const MInt)
Swap the given cells.
MFloat returnLoadRecord() const
virtual MInt determineRestartTimeStep() const
virtual MBool hasRestartTimeStep() const
virtual MBool postSolutionStep()
virtual void setSensors(std::vector< std::vector< MFloat > > &, std::vector< MFloat > &, std::vector< std::bitset< 64 > > &, std::vector< MInt > &)
set solver sensors for split adaptation within the adaptation loop
MString solverType() const
Return the solverType of this solver.
MFloat m_Re
the Reynolds number
virtual MInt cellOutside(const MFloat *, const MInt, const MInt)
Check whether cell is outside the fluid domain.
MFloat m_Ma
the Mach number
Solver(const MInt solverId, const MPI_Comm comm, const MBool isActive=true)
virtual void calcSamplingVarAtPoint(const MFloat *NotUsed(point), const MInt NotUsed(id), const MInt NotUsed(sampleVarId), MFloat *NotUsed(state), const MBool NotUsed(interpolate)=false)
void setSolverStatus(const MBool status)
virtual MFloat & a_FcellVolume(MInt)
virtual MBool hasSplitBalancing() const
Return if load balancing for solver is split into multiple methods or implemented in balance()
virtual void getDefaultWeights(MFloat *NotUsed(weights), std::vector< MString > &NotUsed(names)) const
std::basic_string< char > MString
DlbTimerController g_dlbTimerController