23 {{CONSTRUCTOR_IMPLEMENTATION}}
25 kernels::{{SOLVER_NAME}}::Quadrature<double>::initQuadratureNodesAndWeights();
28{{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::~{{CLASSNAME}}(){
29 kernels::{{SOLVER_NAME}}::Quadrature<double>::freeQuadratureNodesAndWeights();
32double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMinTimeStamp(
bool ofCurrentlyRunningGridSweep)
const {
33 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMinTimeStamp();
36double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMaxTimeStamp(
bool ofCurrentlyRunningGridSweep)
const {
37 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMaxTimeStamp();
40double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMinTimeStepSize()
const {
41 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMinTimeStepSize();
44double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMaxTimeStepSize()
const {
45 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMaxTimeStepSize();
48double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMaxMeshSize()
const {
49 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMaxMeshSize();
52double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMinMeshSize()
const {
53 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMinMeshSize();
56{{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::SolverState {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getSolverState()
const {
60void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startGridConstructionStep() {
61 assertion( _solverState == SolverState::GridConstruction );
64void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishGridConstructionStep() {}
66void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startGridInitialisationStep() {
67 _solverState = SolverState::GridInitialisation;
70void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishGridInitialisationStep() {}
72void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::suspendSolversForOneGridSweep() {
73 _solverState = SolverState::Suspended;
76void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startTimeStep(
77 double globalMinTimeStamp,
78 double globalMaxTimeStamp,
79 double globalMinTimeStepSize,
80 double globalMaxTimeStepSize
82 switch (_solverState) {
83 case SolverState::GridConstruction:
84 _solverState = SolverState::GridInitialisation;
86 case SolverState::GridInitialisation:
87 case SolverState::Suspended:
88 case SolverState::Plotting:
89 case SolverState::RegularSolver:
91 SolverState::RegularSolver : SolverState::LimiterStatusSpreadingToNeighbours);
93 case SolverState::LimiterStatusSpreadingToNeighbours:
94 _solverState = SolverState::LimiterStatusSpreadingToSecondNeighbours;
96 case SolverState::LimiterStatusSpreadingToSecondNeighbours:
97 _solverState = SolverState::LimiterSolver;
99 case SolverState::LimiterSolver:
100 _solverState = SolverState::RegularSolver;
104 if (_solverState==SolverState::RegularSolver) {
109 {{START_TIME_STEP_IMPLEMENTATION}}
111 if (_solverState==SolverState::RegularSolver) {
112 repositories::{{LIMITER_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
118 if (_solverState==SolverState::LimiterSolver) {
119 repositories::{{REGULAR_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
122 if(_solverState==SolverState::LimiterStatusSpreadingToNeighbours
123 or _solverState==SolverState::LimiterStatusSpreadingToSecondNeighbours
125 repositories::{{LIMITER_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
126 repositories::{{REGULAR_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
134 logInfo(
"startTimeStep(...)",
"Solver {{SOLVER_NAME}}:");
140void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishTimeStep() {
141 if (isLastGridSweepOfTimeStep()) {
155 &newNumberOfTroubleCells,
163 {{FINISH_TIME_STEP_IMPLEMENTATION}}
167void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startPlottingStep(
168 double globalMinTimeStamp,
169 double globalMaxTimeStamp,
170 double globalMinTimeStepSize,
171 double globalMaxTimeStepSize
174 _solverState = SolverState::Plotting;
178void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishPlottingStep() {
182std::string {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}
::toString(SolverState
state) {
184 case SolverState::GridConstruction:
185 return "grid-construction";
186 case SolverState::GridInitialisation:
187 return "grid-initialisation";
188 case SolverState::RegularSolver:
189 return "regular-(non-limiting)-solver";
190 case SolverState::LimiterStatusSpreadingToNeighbours:
191 return "limiter-status-spreading-to-neighbours";
192 case SolverState::LimiterStatusSpreadingToSecondNeighbours:
193 return "limiter-status-spreading-to-second-neighbours";
194 case SolverState::LimiterSolver:
195 return "limiting-solver";
196 case SolverState::Plotting:
198 case SolverState::Suspended:
205bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::mayPlot()
const {
209 _solverState==SolverState::GridInitialisation
211 _solverState==SolverState::RegularSolver
212 and repositories::{{REGULAR_SOLVER_INSTANCE}}.mayPlot()
217 _solverState==SolverState::LimiterSolver and
218 repositories::{{LIMITER_SOLVER_INSTANCE}}.mayPlot()
224bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::isFirstGridSweepOfTimeStep()
const {
226 ( _solverState==SolverState::RegularSolver and repositories::{{REGULAR_SOLVER_INSTANCE}}.isFirstGridSweepOfTimeStep() )
228 ( _solverState==SolverState::LimiterSolver and repositories::{{LIMITER_SOLVER_INSTANCE}}.isFirstGridSweepOfTimeStep() )
234bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::isLastGridSweepOfTimeStep()
const {
236 ( _solverState==SolverState::RegularSolver and repositories::{{REGULAR_SOLVER_INSTANCE}}.isLastGridSweepOfTimeStep() )
238 ( _solverState==SolverState::LimiterSolver and repositories::{{LIMITER_SOLVER_INSTANCE}}.isLastGridSweepOfTimeStep() )
243void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startSimulation() {
248void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishSimulation() {
253void {{FULL_QUALIFIED_NAMESPACE}}::{{CLASSNAME}}::addTroubledCell(){
256int {{FULL_QUALIFIED_NAMESPACE}}::{{CLASSNAME}}::getNumberOfTroubledCells()
const {
261{%
if ADMISSIBILITY_IMPLEMENTATION!=
"<empty>" and ADMISSIBILITY_IMPLEMENTATION!=
"<user-defined>" %}
262bool {{FULL_QUALIFIED_NAMESPACE}}::{{CLASSNAME}}::isPhysicallyAdmissible(
263 const double*
const Q,
266 const double timeStamp
268 {%
if ADMISSIBILITY_IMPLEMENTATION!=
"<none>"%}
269 {{ADMISSIBILITY_IMPLEMENTATION}}
277{{SOLVER_USER_DEFINITIONS}}