24 kernels::{{SOLVER_NAME}}::Quadrature<double>::initQuadratureNodesAndWeights();
26 {{CONSTRUCTOR_IMPLEMENTATION}}
29{{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::~{{CLASSNAME}}(){
30 kernels::{{SOLVER_NAME}}::Quadrature<double>::freeQuadratureNodesAndWeights();
33double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMinTimeStamp(
bool ofCurrentlyRunningGridSweep)
const {
34 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMinTimeStamp();
37double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMaxTimeStamp(
bool ofCurrentlyRunningGridSweep)
const {
38 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMaxTimeStamp();
41double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMinTimeStepSize()
const {
42 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMinTimeStepSize();
45double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMaxTimeStepSize()
const {
46 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMaxTimeStepSize();
49double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMaxMeshSize()
const {
50 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMaxMeshSize();
53double {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getMinMeshSize()
const {
54 return repositories::{{REGULAR_SOLVER_INSTANCE}}.getMinMeshSize();
57{{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::SolverState {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::getSolverState()
const {
61void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startGridConstructionStep() {
62 assertion( _solverState == SolverState::GridConstruction );
65void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishGridConstructionStep() {}
67void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startGridInitialisationStep() {
68 _solverState = SolverState::GridInitialisation;
71void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishGridInitialisationStep() {}
73void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::suspendSolversForOneGridSweep() {
74 _solverState = SolverState::Suspended;
77void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startTimeStep(
78 double globalMinTimeStamp,
79 double globalMaxTimeStamp,
80 double globalMinTimeStepSize,
81 double globalMaxTimeStepSize
83 switch (_solverState) {
84 case SolverState::GridConstruction:
85 _solverState = SolverState::GridInitialisation;
87 case SolverState::GridInitialisation:
88 case SolverState::PlottingAfterGridInitialisation:
89 _solverState = SolverState::LimiterStatusSpreadingToNeighbours;
90 repositories::{{LIMITER_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
91 repositories::{{REGULAR_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
93 case SolverState::LimiterStatusSpreadingToNeighbours:
94 repositories::{{LIMITER_SOLVER_INSTANCE}}.suspendSolversForOneGridSweep();
95 case SolverState::TimeStep:
96 case SolverState::Plotting:
97 case SolverState::Suspended:
98 _solverState = SolverState::TimeStep;
102 {{START_TIME_STEP_IMPLEMENTATION}}
105 logInfo(
"startTimeStep(...)",
"Solver {{SOLVER_NAME}}:");
111void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishTimeStep() {
112 if (isLastGridSweepOfTimeStep()) {
124 if (_solverState == SolverState::LimiterStatusSpreadingToNeighbours) {
127 &newNumberOfTroubleCells,
136 {{FINISH_TIME_STEP_IMPLEMENTATION}}
140void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startPlottingStep(
141 double globalMinTimeStamp,
142 double globalMaxTimeStamp,
143 double globalMinTimeStepSize,
144 double globalMaxTimeStepSize
146 if ( _solverState==SolverState::GridInitialisation) {
147 _solverState = SolverState::PlottingAfterGridInitialisation;
150 _solverState = SolverState::Plotting;
155void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishPlottingStep() {
159std::string {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}
::toString(SolverState
state) {
161 case SolverState::GridConstruction:
162 return "grid-construction";
163 case SolverState::GridInitialisation:
164 return "grid-initialisation";
165 case SolverState::PlottingAfterGridInitialisation:
166 return "plotting-after-grid-initialisation";
167 case SolverState::LimiterStatusSpreadingToNeighbours:
168 return "limiter-status-spreading-to-neighbours";
169 case SolverState::TimeStep:
171 case SolverState::Plotting:
173 case SolverState::Suspended:
180bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::mayPlot()
const {
181 return _solverState!=SolverState::LimiterStatusSpreadingToNeighbours;
185bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::isFirstGridSweepOfTimeStep()
const {
187 _solverState!=SolverState::LimiterStatusSpreadingToNeighbours
189 repositories::{{REGULAR_SOLVER_INSTANCE}}.isFirstGridSweepOfTimeStep()
191 repositories::{{LIMITER_SOLVER_INSTANCE}}.isFirstGridSweepOfTimeStep()
197bool {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::isLastGridSweepOfTimeStep()
const {
199 _solverState!=SolverState::LimiterStatusSpreadingToNeighbours
201 repositories::{{REGULAR_SOLVER_INSTANCE}}.isLastGridSweepOfTimeStep()
203 repositories::{{LIMITER_SOLVER_INSTANCE}}.isLastGridSweepOfTimeStep()
208void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::startSimulation() {
213void {{NAMESPACE | join(
"::")}}::{{CLASSNAME}}::finishSimulation() {
218void {{FULL_QUALIFIED_NAMESPACE}}::{{CLASSNAME}}::addTroubledCell(){
222int {{FULL_QUALIFIED_NAMESPACE}}::{{CLASSNAME}}::getNumberOfTroubledCells()
const {
227{%
if ADMISSIBILITY_IMPLEMENTATION!=
"<empty>" and ADMISSIBILITY_IMPLEMENTATION!=
"<user-defined>" %}
228bool {{FULL_QUALIFIED_NAMESPACE}}::{{CLASSNAME}}::isPhysicallyAdmissible(
229 const double*
const Q,
232 const double timeStamp
235 {%
if ADMISSIBILITY_IMPLEMENTATION!=
"<none>"%}
236 {{ADMISSIBILITY_IMPLEMENTATION}}
244{{SOLVER_USER_DEFINITIONS}}