MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
Solver Class Referenceabstract

Parent class of all solvers This class is the base for all solvers. I.e. all solver class (e.g. structured or cartesian) are derived from this class. More...

#include <solver.h>

Inheritance diagram for Solver:
[legend]
Collaboration diagram for Solver:
[legend]

Public Member Functions

MString getIdentifier (const MBool useSolverId=false, const MString preString="", const MString postString="_")
 
virtual ~Solver ()=default
 
virtual MInt noInternalCells () const =0
 Return the number of internal cells within this solver. More...
 
virtual MFloat time () const =0
 Return the time. More...
 
virtual MInt noVariables () const
 Return the number of variables. More...
 
virtual void getDimensionalizationParams (std::vector< std::pair< MFloat, MString > > &) const
 Return the dimensionalization parameters of this solver. More...
 
void updateDomainInfo (const MInt domainId, const MInt noDomains, const MPI_Comm mpiComm, const MString &loc)
 Set new domain information. More...
 
virtual MFloata_slope (const MInt, MInt const, const MInt)
 
virtual MBool a_isBndryCell (const MInt) const
 
virtual MFloata_FcellVolume (MInt)
 
virtual MInt getCurrentTimeStep () const
 
virtual void accessSampleVariables (MInt, MFloat *&)
 
virtual void getSampleVariableNames (std::vector< MString > &NotUsed(varNames))
 
virtual MBool a_isBndryGhostCell (MInt) const
 
virtual void saveCoarseSolution ()
 
virtual void getSolverSamplingProperties (std::vector< MInt > &NotUsed(samplingVarIds), std::vector< MInt > &NotUsed(noSamplingVars), std::vector< std::vector< MString > > &NotUsed(samplingVarNames), const MString NotUsed(featureName)="")
 
virtual void initSolverSamplingVariables (const std::vector< MInt > &NotUsed(varIds), const std::vector< MInt > &NotUsed(noSamplingVars))
 
virtual void calcSamplingVariables (const std::vector< MInt > &NotUsed(varIds), const MBool NotUsed(exchange))
 
virtual void calcSamplingVarAtPoint (const MFloat *NotUsed(point), const MInt NotUsed(id), const MInt NotUsed(sampleVarId), MFloat *NotUsed(state), const MBool NotUsed(interpolate)=false)
 
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. More...
 
virtual MBool hasSplitBalancing () const
 Return if load balancing for solver is split into multiple methods or implemented in balance() More...
 
virtual void balancePre ()
 
virtual void balancePost ()
 
virtual void finalizeBalance ()
 
virtual void resetSolver ()
 Reset the solver/solver for load balancing. More...
 
virtual void cancelMpiRequests ()
 Cancel open mpi (receive) requests in the solver (e.g. due to interleaved execution) More...
 
virtual void setCellWeights (MFloat *)
 Set cell weights. More...
 
virtual MInt noLoadTypes () const
 
virtual void getDefaultWeights (MFloat *NotUsed(weights), std::vector< MString > &NotUsed(names)) const
 
virtual void getLoadQuantities (MInt *const NotUsed(loadQuantities)) const
 
virtual MFloat getCellLoad (const MInt NotUsed(cellId), const MFloat *const NotUsed(weights)) const
 
virtual void limitWeights (MFloat *NotUsed(weights))
 
virtual void localToGlobalIds ()
 
virtual void globalToLocalIds ()
 
virtual MInt noCellDataDlb () const
 Methods to inquire solver data information. More...
 
virtual MInt cellDataTypeDlb (const MInt NotUsed(dataId)) const
 
virtual MInt cellDataSizeDlb (const MInt NotUsed(dataId), const MInt NotUsed(cellId))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MInt *const NotUsed(data))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MLong *const NotUsed(data))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MFloat *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MInt *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MLong *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MFloat *const NotUsed(data))
 
virtual void getGlobalSolverVars (std::vector< MFloat > &NotUsed(globalFloatVars), std::vector< MInt > &NotUsed(globalIntVars))
 
virtual void setGlobalSolverVars (std::vector< MFloat > &NotUsed(globalFloatVars), std::vector< MInt > &NotUsed(globalIdVars))
 
void enableDlbTimers ()
 
void reEnableDlbTimers ()
 
void disableDlbTimers ()
 
MBool dlbTimersEnabled ()
 
void startLoadTimer (const MString name)
 
void stopLoadTimer (const MString &name)
 
void stopIdleTimer (const MString &name)
 
void startIdleTimer (const MString &name)
 
MBool isLoadTimerRunning ()
 
virtual MInt noSolverTimers (const MBool NotUsed(allTimings))
 
virtual void getSolverTimings (std::vector< std::pair< MString, MFloat > > &NotUsed(solverTimings), const MBool NotUsed(allTimings))
 
virtual void getDomainDecompositionInformation (std::vector< std::pair< MString, MInt > > &NotUsed(domainInfo))
 
void setDlbTimer (const MInt timerId)
 
virtual void prepareAdaptation (std::vector< std::vector< MFloat > > &, std::vector< MFloat > &, std::vector< std::bitset< 64 > > &, std::vector< MInt > &)
 
virtual void reinitAfterAdaptation ()
 
virtual void prepareAdaptation ()
 prepare adaptation for split adaptation before the adaptation loop More...
 
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 More...
 
virtual void saveSensorData (const std::vector< std::vector< MFloat > > &, const MInt &, const MString &, const MInt *const)
 
virtual void postAdaptation ()
 post adaptation for split adaptation within the adaptation loop More...
 
virtual void finalizeAdaptation ()
 finalize adaptation for split sadptation after the adaptation loop More...
 
virtual void refineCell (const MInt)
 Refine the given cell. More...
 
virtual void removeChilds (const MInt)
 Coarsen the given cell. More...
 
virtual void removeCell (const MInt)
 Remove the given cell. More...
 
virtual void swapCells (const MInt, const MInt)
 Swap the given cells. More...
 
virtual void swapProxy (const MInt, const MInt)
 Swap the given cells. More...
 
virtual MInt cellOutside (const MFloat *, const MInt, const MInt)
 Check whether cell is outside the fluid domain. More...
 
virtual void resizeGridMap ()
 Swap the given cells. More...
 
virtual MBool prepareRestart (MBool, MBool &)
 Prepare the solvers for a grid-restart. More...
 
virtual void reIntAfterRestart (MBool)
 
MPI_Comm mpiComm () const
 Return the MPI communicator used by this solver. More...
 
virtual MInt domainId () const
 Return the domainId (rank) More...
 
virtual MInt noDomains () const
 
virtual MBool isActive () const
 
void setSolverStatus (const MBool status)
 
MBool getSolverStatus ()
 Get the solver status indicating if the solver is currently active in the execution recipe. More...
 
MString testcaseDir () const
 Return the testcase directory. More...
 
MString outputDir () const
 Return the directory for output files. More...
 
MString restartDir () const
 Return the directory for restart files. More...
 
MString solverMethod () const
 Return the solverMethod of this solver. More...
 
MString solverType () const
 Return the solverType of this solver. More...
 
MInt restartInterval () const
 Return the restart interval of this solver. More...
 
MInt restartTimeStep () const
 Return the restart interval of this solver. More...
 
MInt solverId () const
 Return the solverId. More...
 
MBool restartFile ()
 
MInt readSolverSamplingVarNames (std::vector< MString > &varNames, const MString featureName="") const
 Read sampling variables names, store in vector and return the number of sampling variables. More...
 
virtual MBool hasRestartTimeStep () const
 
virtual MBool forceAdaptation ()
 
virtual void preTimeStep ()=0
 
virtual void postTimeStep ()=0
 
virtual void initSolver ()=0
 
virtual void finalizeInitSolver ()=0
 
virtual void saveSolverSolution (const MBool NotUsed(forceOutput)=false, const MBool NotUsed(finalTimeStep)=false)=0
 
virtual void cleanUp ()=0
 
virtual MBool solutionStep ()
 
virtual void preSolutionStep (MInt)
 
virtual MBool postSolutionStep ()
 
virtual MBool solverConverged ()
 
virtual void getInterpolatedVariables (MInt, const MFloat *, MFloat *)
 
virtual void loadRestartFile ()
 
virtual MInt determineRestartTimeStep () const
 
virtual void writeRestartFile (MBool)
 
virtual void writeRestartFile (const MBool, const MBool, const MString, MInt *)
 
virtual void setTimeStep ()
 
virtual void implicitTimeStep ()
 
virtual void prepareNextTimeStep ()
 

Public Attributes

std::set< MIntm_freeIndices
 
MBool m_singleAdaptation = false
 
MBool m_splitAdaptation = true
 
MBool m_saveSensorData = false
 

Protected Member Functions

 Solver (const MInt solverId, const MPI_Comm comm, const MBool isActive=true)
 
MFloat returnLoadRecord () const
 
MFloat returnIdleRecord () const
 

Protected Attributes

MFloat m_Re {}
 the Reynolds number More...
 
MFloat m_Ma {}
 the Mach number More...
 
MInt m_solutionInterval
 The number of timesteps before writing the next solution file. More...
 
MInt m_solutionOffset {}
 
std::set< MIntm_solutionTimeSteps
 
MInt m_restartInterval
 The number of timesteps before writing the next restart file. More...
 
MInt m_restartTimeStep
 
MInt m_restartOffset
 
MString m_solutionOutput
 
MBool m_useNonSpecifiedRestartFile = false
 
MBool m_initFromRestartFile
 
MInt m_residualInterval
 The number of timesteps before writing the next residual. More...
 
const MInt m_solverId
 a unique solver identifier More...
 
MFloatm_outerBandWidth = nullptr
 
MFloatm_innerBandWidth = nullptr
 
MIntm_bandWidth = nullptr
 
MBool m_restart = false
 
MBool m_restartFile = false
 

Private Member Functions

void initAdaptation ()
 

Private Attributes

friend Application
 
MString m_testcaseDir
 
MString m_outputDir
 
MString m_restartDir
 
MPI_Comm m_mpiComm
 
MInt m_domainId
 
MInt m_noDomains
 
MBool m_solverStatus = true
 
MString m_solverMethod
 
MString m_solverType
 
const MInt m_noDim
 
MInt m_dlbTimerId = -1
 

Static Private Attributes

static std::map< MInt, MStringm_aliases
 

Friends

template<MInt nDim, class ppType >
class PostProcessing
 

Detailed Description

Definition at line 29 of file solver.h.

Constructor & Destructor Documentation

◆ Solver()

Solver::Solver ( const MInt  solverId,
const MPI_Comm  comm,
const MBool  isActive = true 
)
protected

◆ ~Solver()

virtual Solver::~Solver ( )
virtualdefault

Member Function Documentation

◆ a_FcellVolume()

◆ a_isBndryCell()

◆ a_isBndryGhostCell()

◆ a_slope()

virtual MFloat & Solver::a_slope ( const  MInt,
MInt const  ,
const  MInt 
)
inlinevirtual

◆ accessSampleVariables()

virtual void Solver::accessSampleVariables ( MInt  ,
MFloat *&   
)
inlinevirtual

Definition at line 158 of file solver.h.

158{ TERMM(1, "Not implemented for this solver"); };

◆ balance()

virtual void Solver::balance ( const MInt *const   NotUsednoCellsToReceiveByDomain,
const MInt *const   NotUsednoCellsToSendByDomain,
const MInt *const   NotUsedtargetDomainsByCell,
const MInt   NotUsedoldNoCells 
)
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >.

Definition at line 188 of file solver.h.

191 {
192 TERMM(1, "Not implemented for this solver");
193 }

◆ balancePost()

◆ balancePre()

◆ calcSamplingVarAtPoint()

virtual void Solver::calcSamplingVarAtPoint ( const MFloat NotUsedpoint,
const MInt   NotUsedid,
const MInt   NotUsedsampleVarId,
MFloat NotUsedstate,
const MBool   NotUsedinterpolate = false 
)
inlinevirtual

Definition at line 180 of file solver.h.

182 {
183 TERMM(1, "Not implemented for this solver");
184 };

◆ calcSamplingVariables()

virtual void Solver::calcSamplingVariables ( const std::vector< MInt > &  NotUsedvarIds,
const MBool   NotUsedexchange 
)
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >.

Definition at line 177 of file solver.h.

177 {
178 TERMM(1, "Not implemented for this solver");
179 };

◆ cancelMpiRequests()

◆ cellDataSizeDlb()

virtual MInt Solver::cellDataSizeDlb ( const MInt   NotUseddataId,
const MInt   NotUsedcellId 
)
inlinevirtual

Definition at line 237 of file solver.h.

237{ return -1; };

◆ cellDataTypeDlb()

virtual MInt Solver::cellDataTypeDlb ( const MInt   NotUseddataId) const
inlinevirtual

Definition at line 236 of file solver.h.

236{ return -1; };

◆ cellOutside()

◆ cleanUp()

◆ determineRestartTimeStep()

virtual MInt Solver::determineRestartTimeStep ( ) const
inlinevirtual

◆ disableDlbTimers()

void Solver::disableDlbTimers ( )
inline

Definition at line 289 of file solver.h.

void disableDlbTimers(const MInt dlbTimerId)
Disable the given DLB timer.
Definition: dlbtimer.h:284
MInt m_dlbTimerId
Definition: solver.h:62
DlbTimerController g_dlbTimerController

◆ dlbTimersEnabled()

MBool Solver::dlbTimersEnabled ( )
inline

Definition at line 291 of file solver.h.

MBool dlbTimersEnabled(const MInt dlbTimerId)
Return if the given DLB timer is enabled.
Definition: dlbtimer.h:324

◆ domainId()

virtual MInt Solver::domainId ( ) const
inlinevirtual

Reimplemented in LPT< nDim >.

Definition at line 383 of file solver.h.

383{ return m_domainId; }
MInt m_domainId
Definition: solver.h:49

◆ enableDlbTimers()

void Solver::enableDlbTimers ( )
inline

Definition at line 283 of file solver.h.

void enableDlbTimers(const MInt dlbTimerId)
Enable the given DLB timer.
Definition: dlbtimer.h:254

◆ finalizeAdaptation()

◆ finalizeBalance()

◆ finalizeInitSolver()

◆ forceAdaptation()

◆ getCellDataDlb() [1/3]

virtual void Solver::getCellDataDlb ( const MInt   NotUseddataId,
const MInt   NotUsedoldNoCells,
const MInt *const   NotUsedbufferIdToCellId,
MFloat *const   NotUseddata 
)
inlinevirtual

Definition at line 249 of file solver.h.

250 {
251 TERMM(1, "Not implemented for solver.");
252 }

◆ getCellDataDlb() [2/3]

virtual void Solver::getCellDataDlb ( const MInt   NotUseddataId,
const MInt   NotUsedoldNoCells,
const MInt *const   NotUsedbufferIdToCellId,
MInt *const   NotUseddata 
)
inlinevirtual

Definition at line 241 of file solver.h.

242 {
243 TERMM(1, "Not implemented for solver.");
244 }

◆ getCellDataDlb() [3/3]

virtual void Solver::getCellDataDlb ( const MInt   NotUseddataId,
const MInt   NotUsedoldNoCells,
const MInt *const   NotUsedbufferIdToCellId,
MLong *const   NotUseddata 
)
inlinevirtual

Definition at line 245 of file solver.h.

246 {
247 TERMM(1, "Not implemented for solver.");
248 }

◆ getCellLoad()

virtual MFloat Solver::getCellLoad ( const MInt   NotUsedcellId,
const MFloat *const   NotUsedweights 
) const
inlinevirtual

Definition at line 216 of file solver.h.

216{ return -1.0; };

◆ getCurrentTimeStep()

◆ getDefaultWeights()

virtual void Solver::getDefaultWeights ( MFloat NotUsedweights,
std::vector< MString > &  NotUsednames 
) const
inlinevirtual

Definition at line 212 of file solver.h.

212 {
213 TERMM(1, "Not implemented for this solver");
214 };

◆ getDimensionalizationParams()

virtual void Solver::getDimensionalizationParams ( std::vector< std::pair< MFloat, MString > > &  ) const
inlinevirtual

◆ getDomainDecompositionInformation()

virtual void Solver::getDomainDecompositionInformation ( std::vector< std::pair< MString, MInt > > &  NotUseddomainInfo)
inlinevirtual

Definition at line 312 of file solver.h.

312 {
313 TERMM(1, "not implemented for solver");
314 };

◆ getGlobalSolverVars()

virtual void Solver::getGlobalSolverVars ( std::vector< MFloat > &  NotUsedglobalFloatVars,
std::vector< MInt > &  NotUsedglobalIntVars 
)
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >.

Definition at line 264 of file solver.h.

265 {
266 // todo labels:toenhance fix this by writing a stub in offending solver with proper warning message or reason why
267 // impl is not
268 // needed
269 // std::cerr << "ERROR: calling getGlobalSolverVars() within solver without implementation!"<<std::endl;
270 // TERMM(1, "Not implemented for this solver");
271 };

◆ getIdentifier()

MString Solver::getIdentifier ( const MBool  useSolverId = false,
const MString  preString = "",
const MString  postString = "_" 
)

Definition at line 188 of file solver.cpp.

188 {
189 if(Context::solverPropertyExists("solverAlias", m_solverId)) {
190 return preString + m_aliases.at(m_solverId) + postString;
191 } else if(useSolverId) {
192 return preString + std::to_string(m_solverId) + postString;
193 } else {
194 return "";
195 }
196}
static MBool solverPropertyExists(const MString &name, MInt solver)
Checks existence of a solver property details This function returns true, if the solver property with...
Definition: context.cpp:519
static std::map< MInt, MString > m_aliases
Definition: solver.h:64
const MInt m_solverId
a unique solver identifier
Definition: solver.h:90

◆ getInterpolatedVariables()

◆ getLoadQuantities()

virtual void Solver::getLoadQuantities ( MInt *const   NotUsedloadQuantities) const
inlinevirtual

Definition at line 215 of file solver.h.

215{};

◆ getSampleVariableNames()

virtual void Solver::getSampleVariableNames ( std::vector< MString > &  NotUsedvarNames)
inlinevirtual

Definition at line 159 of file solver.h.

159 {
160 TERMM(1, "Not implemented for this solver");
161 };

◆ getSolverSamplingProperties()

virtual void Solver::getSolverSamplingProperties ( std::vector< MInt > &  NotUsedsamplingVarIds,
std::vector< MInt > &  NotUsednoSamplingVars,
std::vector< std::vector< MString > > &  NotUsedsamplingVarNames,
const MString   NotUsedfeatureName = "" 
)
inlinevirtual

Definition at line 166 of file solver.h.

169 {
170 TERMM(1, "Not implemented for this solver");
171 };

◆ getSolverStatus()

MBool Solver::getSolverStatus ( )
inline

Definition at line 401 of file solver.h.

401{ return m_solverStatus; }
MBool m_solverStatus
Definition: solver.h:55

◆ getSolverTimings()

virtual void Solver::getSolverTimings ( std::vector< std::pair< MString, MFloat > > &  NotUsedsolverTimings,
const MBool   NotUsedallTimings 
)
inlinevirtual

Definition at line 307 of file solver.h.

308 {
309 TERMM(1, "not implemented in base class");
310 }

◆ globalToLocalIds()

virtual void Solver::globalToLocalIds ( )
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >.

Definition at line 226 of file solver.h.

226 {
227 // todo labels:toenhance fix this by writing a stub in offending solver with proper warning message or reason why
228 // impl is not
229 // needed
230 // std::cerr << "ERROR: calling globalToLocalIds() within solver without implementation!"<<std::endl;
231 // TERMM(1, "Not implemented for this solver");
232 };

◆ hasRestartTimeStep()

virtual MBool Solver::hasRestartTimeStep ( ) const
inlinevirtual

◆ hasSplitBalancing()

◆ implicitTimeStep()

virtual void Solver::implicitTimeStep ( )
inlinevirtual

◆ initAdaptation()

void Solver::initAdaptation ( )
private

◆ initSolver()

◆ initSolverSamplingVariables()

virtual void Solver::initSolverSamplingVariables ( const std::vector< MInt > &  NotUsedvarIds,
const std::vector< MInt > &  NotUsednoSamplingVars 
)
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >.

Definition at line 172 of file solver.h.

173 {
174 TERMM(1, "Not implemented for this solver");
175 };

◆ isActive()

◆ isLoadTimerRunning()

MBool Solver::isLoadTimerRunning ( )
inline

Definition at line 303 of file solver.h.

MBool isLoadTimerRunning(const MInt dlbTimerId)
Definition: dlbtimer.h:441

◆ limitWeights()

virtual void Solver::limitWeights ( MFloat NotUsedweights)
inlinevirtual

Definition at line 217 of file solver.h.

217{};

◆ loadRestartFile()

◆ localToGlobalIds()

virtual void Solver::localToGlobalIds ( )
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >, FvMbCartesianSolverXD< nDim, SysEqn >, LsCartesianSolver< nDim_ >, and LsCartesianSolver< nDim >.

Definition at line 219 of file solver.h.

219 {
220 // todo labels:toenhance fix this by writing a stub in offending solver with proper warning message or reason why
221 // impl is not
222 // needed
223 // std::cerr << "ERROR: calling localToGlobalIds() within solver without implementation!"<<std::endl;
224 // TERMM(1, "Not implemented for this solver");
225 };

◆ mpiComm()

MPI_Comm Solver::mpiComm ( ) const
inline

Definition at line 380 of file solver.h.

380{ return m_mpiComm; }
MPI_Comm m_mpiComm
Definition: solver.h:46

◆ noCellDataDlb()

◆ noDomains()

virtual MInt Solver::noDomains ( ) const
inlinevirtual

Return the total number of domains (total number of ranks in current MPI communicator)

Reimplemented in LPT< nDim >.

Definition at line 387 of file solver.h.

387{ return m_noDomains; }
MInt m_noDomains
Definition: solver.h:52

◆ noInternalCells()

◆ noLoadTypes()

◆ noSolverTimers()

virtual MInt Solver::noSolverTimers ( const MBool   NotUsedallTimings)
inlinevirtual

Definition at line 305 of file solver.h.

MInt noSubTimers() const
Return the number of (sub-)timers for each DLB timer.
Definition: dlbtimer.h:487

◆ noVariables()

◆ outputDir()

MString Solver::outputDir ( ) const
inline

Definition at line 407 of file solver.h.

407{ return m_outputDir; }
MString m_outputDir
Definition: solver.h:40

◆ postAdaptation()

◆ postSolutionStep()

◆ postTimeStep()

◆ prepareAdaptation() [1/2]

◆ prepareAdaptation() [2/2]

virtual void Solver::prepareAdaptation ( std::vector< std::vector< MFloat > > &  ,
std::vector< MFloat > &  ,
std::vector< std::bitset< 64 > > &  ,
std::vector< MInt > &   
)
inlinevirtual

Prepare the solver/solver for adaptation and collect refinement sensors TODO labels:toremove remove once all solvers use the split adaptation

Definition at line 325 of file solver.h.

326 {
327 TERMM(1, "Not implemented for this solver");
328 };

◆ prepareNextTimeStep()

virtual void Solver::prepareNextTimeStep ( )
inlinevirtual

Reimplemented in FvMbCartesianSolverXD< nDim, SysEqn >.

Definition at line 481 of file solver.h.

481{ return; };

◆ prepareRestart()

◆ preSolutionStep()

◆ preTimeStep()

◆ readSolverSamplingVarNames()

MInt Solver::readSolverSamplingVarNames ( std::vector< MString > &  varNames,
const MString  featureName = "" 
) const

Definition at line 167 of file solver.cpp.

167 {
168 MInt noVars = 0;
169 MString propName = "samplingVariables"; // default property
170 if(featureName != ""
171 && Context::propertyExists("samplingVariables" + featureName, m_solverId)) { // feature specific property
172 propName += featureName;
173 }
174
175 if(Context::propertyExists(propName, m_solverId)) {
176 // Number of sampling variables
177 noVars = Context::propertyLength(propName, solverId());
178
179 varNames.clear();
180 for(MInt i = 0; i < noVars; i++) {
181 const MString samplingVarName = Context::getSolverProperty<MString>(propName, solverId(), AT_, i);
182 varNames.push_back(samplingVarName);
183 }
184 }
185 return noVars;
186}
static MInt propertyLength(const MString &name, MInt solverId=m_noSolvers)
Returns the number of elements of a property.
Definition: context.cpp:538
static MBool propertyExists(const MString &name, MInt solver=m_noSolvers)
This function checks if a property exists in general.
Definition: context.cpp:494
MInt solverId() const
Return the solverId.
Definition: solver.h:425
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55

◆ reEnableDlbTimers()

void Solver::reEnableDlbTimers ( )
inline

Definition at line 286 of file solver.h.

◆ refineCell()

◆ reinitAfterAdaptation()

virtual void Solver::reinitAfterAdaptation ( )
inlinevirtual

Reinit the solver/solver after adaptation TODO labels:toremove remove once all solvers use the split adaptation

Reimplemented in RigidBodies< nDim >.

Definition at line 332 of file solver.h.

332{ TERMM(1, "Not implemented for this solver"); };

◆ reIntAfterRestart()

◆ removeCell()

◆ removeChilds()

◆ resetSolver()

◆ resizeGridMap()

◆ restartDir()

MString Solver::restartDir ( ) const
inline

Definition at line 410 of file solver.h.

410{ return m_restartDir; }
MString m_restartDir
Definition: solver.h:43

◆ restartFile()

MBool Solver::restartFile ( )
inline

Definition at line 427 of file solver.h.

427{ return m_restartFile; };
MBool m_restartFile
Definition: solver.h:98

◆ restartInterval()

MInt Solver::restartInterval ( ) const
inline

Definition at line 419 of file solver.h.

419{ return m_restartInterval; }
MInt m_restartInterval
The number of timesteps before writing the next restart file.
Definition: solver.h:79

◆ restartTimeStep()

MInt Solver::restartTimeStep ( ) const
inline

Definition at line 422 of file solver.h.

422{ return m_restartTimeStep; }
MInt m_restartTimeStep
Definition: solver.h:80

◆ returnIdleRecord()

MFloat Solver::returnIdleRecord ( ) const
inlineprotected

Definition at line 486 of file solver.h.

MFloat returnIdleRecord(const MInt dlbTimerId, const MInt mode=0)
Return the idle record of a DLB timer.
Definition: dlbtimer.h:474

◆ returnLoadRecord()

MFloat Solver::returnLoadRecord ( ) const
inlineprotected

Definition at line 485 of file solver.h.

MFloat returnLoadRecord(const MInt dlbTimerId, const MInt mode=0)
Return the load record of a DLB timer.
Definition: dlbtimer.h:464

◆ saveCoarseSolution()

virtual void Solver::saveCoarseSolution ( )
inlinevirtual

Definition at line 164 of file solver.h.

164{ TERMM(1, "Not implemented for this solver"); }; // only implemented in LBSolver

◆ saveSensorData()

◆ saveSolverSolution()

virtual void Solver::saveSolverSolution ( const MBool   NotUsedforceOutput = false,
const MBool   NotUsedfinalTimeStep = false 
)
pure virtual

◆ setCellDataDlb() [1/3]

virtual void Solver::setCellDataDlb ( const MInt   NotUseddataId,
const MFloat *const   NotUseddata 
)
inlinevirtual

Definition at line 259 of file solver.h.

259 {
260 TERMM(1, "Not implemented for solver.");
261 }

◆ setCellDataDlb() [2/3]

virtual void Solver::setCellDataDlb ( const MInt   NotUseddataId,
const MInt *const   NotUseddata 
)
inlinevirtual

Definition at line 253 of file solver.h.

253 {
254 TERMM(1, "Not implemented for solver.");
255 }

◆ setCellDataDlb() [3/3]

virtual void Solver::setCellDataDlb ( const MInt   NotUseddataId,
const MLong *const   NotUseddata 
)
inlinevirtual

Definition at line 256 of file solver.h.

256 {
257 TERMM(1, "Not implemented for solver.");
258 }

◆ setCellWeights()

◆ setDlbTimer()

void Solver::setDlbTimer ( const MInt  timerId)
inline

Definition at line 316 of file solver.h.

316 {
317 if(m_dlbTimerId != -1) {
318 TERMM(1, "m_dlbTimerId already set");
319 }
320 m_dlbTimerId = timerId;
321 }

◆ setGlobalSolverVars()

virtual void Solver::setGlobalSolverVars ( std::vector< MFloat > &  NotUsedglobalFloatVars,
std::vector< MInt > &  NotUsedglobalIdVars 
)
inlinevirtual

Reimplemented in DgCartesianSolver< nDim, SysEqn >.

Definition at line 272 of file solver.h.

273 {
274 // todo labels:toenhance fix this by writing a stub in offending solver with proper warning message or reason why
275 // impl is not
276 // needed
277 // std::cerr << "ERROR: calling setGlobalSolverVars() within solver without implementation!"<<std::endl;
278 // TERMM(1, "Not implemented for this solver");
279 };

◆ setSensors()

virtual void Solver::setSensors ( std::vector< std::vector< MFloat > > &  ,
std::vector< MFloat > &  ,
std::vector< std::bitset< 64 > > &  ,
std::vector< MInt > &   
)
inlinevirtual

◆ setSolverStatus()

void Solver::setSolverStatus ( const MBool  status)
inline

Set the solver status to indicate if the solver is currently active in the execution recipe Note: might be required for couplers to check which solvers currently require coupling

Definition at line 398 of file solver.h.

398{ m_solverStatus = status; }

◆ setTimeStep()

◆ solutionStep()

◆ solverConverged()

virtual MBool Solver::solverConverged ( )
inlinevirtual

Reimplemented in AcaSolver< nDim >, and DgCartesianSolver< nDim, SysEqn >.

Definition at line 457 of file solver.h.

457{ return false; };

◆ solverId()

MInt Solver::solverId ( ) const
inline

Definition at line 425 of file solver.h.

425{ return m_solverId; };

◆ solverMethod()

MString Solver::solverMethod ( ) const
inline

Definition at line 413 of file solver.h.

413{ return m_solverMethod; }
MString m_solverMethod
Definition: solver.h:57

◆ solverType()

MString Solver::solverType ( ) const
inline

Definition at line 416 of file solver.h.

416{ return m_solverType; }
MString m_solverType
Definition: solver.h:58

◆ startIdleTimer()

void Solver::startIdleTimer ( const MString name)
inline

Definition at line 299 of file solver.h.

299 {
301 }
void startIdleTimer(const MInt dlbTimerId, const MString &name)
Start the idle timer for the given DLB timer id.
Definition: dlbtimer.h:371

◆ startLoadTimer()

void Solver::startLoadTimer ( const MString  name)
inline

Definition at line 293 of file solver.h.

void startLoadTimer(const MInt dlbTimerId, const MString &name)
Start the load timer for the given DLB timer id.
Definition: dlbtimer.h:334

◆ stopIdleTimer()

void Solver::stopIdleTimer ( const MString name)
inline

Definition at line 297 of file solver.h.

void stopIdleTimer(const MInt dlbTimerId, const MString &name)
Stop the idle timer for the given DLB timer id.
Definition: dlbtimer.h:392

◆ stopLoadTimer()

void Solver::stopLoadTimer ( const MString name)
inline

Definition at line 295 of file solver.h.

void stopLoadTimer(const MInt dlbTimerId, const MString &name)
Stop the load timer for the given DLB timer id.
Definition: dlbtimer.h:355

◆ swapCells()

◆ swapProxy()

◆ testcaseDir()

MString Solver::testcaseDir ( ) const
inline

Definition at line 404 of file solver.h.

404{ return m_testcaseDir; }
MString m_testcaseDir
Definition: solver.h:37

◆ time()

◆ updateDomainInfo()

void Solver::updateDomainInfo ( const MInt  domainId,
const MInt  noDomains,
const MPI_Comm  mpiComm,
const MString loc 
)
inline

Definition at line 135 of file solver.h.

135 {
139
140 // DEBUG output
141 m_log << "Solver #" << solverId() << " updateDomainInfo: domainId=" << domainId << ", noDomains=" << noDomains
142 << " from " << loc << std::endl;
143 //#ifndef NDEBUG
144 // std::cerr << "Solver #" << solverId() << " updateDomainInfo: domainId=" << domainId
145 // << ", noDomains=" << noDomains << " from " << loc << std::endl;
146 //#endif
147 }
virtual MInt domainId() const
Return the domainId (rank)
Definition: solver.h:383
MPI_Comm mpiComm() const
Return the MPI communicator used by this solver.
Definition: solver.h:380
virtual MInt noDomains() const
Definition: solver.h:387
InfoOutFile m_log

◆ writeRestartFile() [1/2]

◆ writeRestartFile() [2/2]

Friends And Related Function Documentation

◆ PostProcessing

template<MInt nDim, class ppType >
friend class PostProcessing
friend

Definition at line 33 of file solver.h.

Member Data Documentation

◆ Application

friend Solver::Application
private

Definition at line 31 of file solver.h.

◆ m_aliases

std::map< MInt, MString > Solver::m_aliases
staticprivate

Definition at line 64 of file solver.h.

◆ m_bandWidth

MInt* Solver::m_bandWidth = nullptr
protected

Definition at line 94 of file solver.h.

◆ m_dlbTimerId

MInt Solver::m_dlbTimerId = -1
private

Definition at line 62 of file solver.h.

◆ m_domainId

MInt Solver::m_domainId
private

Definition at line 49 of file solver.h.

◆ m_freeIndices

std::set<MInt> Solver::m_freeIndices

Definition at line 101 of file solver.h.

◆ m_initFromRestartFile

MBool Solver::m_initFromRestartFile
protected

Definition at line 84 of file solver.h.

◆ m_innerBandWidth

MFloat* Solver::m_innerBandWidth = nullptr
protected

Definition at line 93 of file solver.h.

◆ m_Ma

MFloat Solver::m_Ma {}
protected

Definition at line 71 of file solver.h.

◆ m_mpiComm

MPI_Comm Solver::m_mpiComm
private

Definition at line 46 of file solver.h.

◆ m_noDim

const MInt Solver::m_noDim
private

Definition at line 60 of file solver.h.

◆ m_noDomains

MInt Solver::m_noDomains
private

Definition at line 52 of file solver.h.

◆ m_outerBandWidth

MFloat* Solver::m_outerBandWidth = nullptr
protected

Definition at line 92 of file solver.h.

◆ m_outputDir

MString Solver::m_outputDir
private

Definition at line 40 of file solver.h.

◆ m_Re

MFloat Solver::m_Re {}
protected

Definition at line 68 of file solver.h.

◆ m_residualInterval

MInt Solver::m_residualInterval
protected

Definition at line 87 of file solver.h.

◆ m_restart

MBool Solver::m_restart = false
protected

Definition at line 97 of file solver.h.

◆ m_restartDir

MString Solver::m_restartDir
private

Definition at line 43 of file solver.h.

◆ m_restartFile

MBool Solver::m_restartFile = false
protected

Definition at line 98 of file solver.h.

◆ m_restartInterval

MInt Solver::m_restartInterval
protected

Definition at line 79 of file solver.h.

◆ m_restartOffset

MInt Solver::m_restartOffset
protected

Definition at line 81 of file solver.h.

◆ m_restartTimeStep

MInt Solver::m_restartTimeStep
protected

Definition at line 80 of file solver.h.

◆ m_saveSensorData

MBool Solver::m_saveSensorData = false

Definition at line 109 of file solver.h.

◆ m_singleAdaptation

MBool Solver::m_singleAdaptation = false

Definition at line 103 of file solver.h.

◆ m_solutionInterval

MInt Solver::m_solutionInterval
protected

Definition at line 74 of file solver.h.

◆ m_solutionOffset

MInt Solver::m_solutionOffset {}
protected

Definition at line 75 of file solver.h.

◆ m_solutionOutput

MString Solver::m_solutionOutput
protected

Definition at line 82 of file solver.h.

◆ m_solutionTimeSteps

std::set<MInt> Solver::m_solutionTimeSteps
protected

Definition at line 76 of file solver.h.

◆ m_solverId

const MInt Solver::m_solverId
protected

Definition at line 90 of file solver.h.

◆ m_solverMethod

MString Solver::m_solverMethod
private

Definition at line 57 of file solver.h.

◆ m_solverStatus

MBool Solver::m_solverStatus = true
private

Definition at line 55 of file solver.h.

◆ m_solverType

MString Solver::m_solverType
private

Definition at line 58 of file solver.h.

◆ m_splitAdaptation

MBool Solver::m_splitAdaptation = true

Definition at line 106 of file solver.h.

◆ m_testcaseDir

MString Solver::m_testcaseDir
private

Definition at line 37 of file solver.h.

◆ m_useNonSpecifiedRestartFile

MBool Solver::m_useNonSpecifiedRestartFile = false
protected

Definition at line 83 of file solver.h.


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