5#include "GlobalState.h"
15{%
for PARTICLE in PARTICLE_SPECIES -%}
16#include "globaldata/{{ PARTICLE }}.h"
17#include "vertexdata/{{ PARTICLE }}Set.h"
21{%
for item in NAMESPACE -%}
22 namespace {{ item }} {
28{%
if LOAD_BALANCER!=
"" -%}
29{{LOAD_BALANCER}} loadBalancer({{LOAD_BALANCER_ARGUMENTS}});
35bool rerunPreviousGridSweep() {
37 {%
for PARTICLE in PARTICLE_SPECIES -%}
38 result |= vertexdata::{{PARTICLE}}Set::getNumberOfDropsIntoHorizontalTreeDecomposition()>0;
40 result |= globaldata::{{PARTICLE}}::getSpecies().rerunPreviousGridSweep();
46double getMinTimeStamp() {
47 double result = std::numeric_limits<double>::max();
48 {%
for PARTICLE in PARTICLE_SPECIES -%}
49 result = std::min( result, globaldata::{{PARTICLE}}::getSpecies().getMinTimeStamp() );
55double getMaxTimeStamp() {
57 {%
for PARTICLE in PARTICLE_SPECIES -%}
58 result = std::max( result, globaldata::{{PARTICLE}}::getSpecies().getMaxTimeStamp() );
64double getMinSearchRadius() {
65 double result = std::numeric_limits<double>::max();
66 {%
for PARTICLE in PARTICLE_SPECIES -%}
67 result = std::min( result, globaldata::{{PARTICLE}}::getSpecies().getMinSearchRadius() );
73double getMaxSearchRadius() {
75 {%
for PARTICLE in PARTICLE_SPECIES -%}
76 result = std::max( result, globaldata::{{PARTICLE}}::getSpecies().getMaxSearchRadius() );
82double getMinTimeStepSize() {
83 double result = std::numeric_limits<double>::max();
84 {%
for PARTICLE in PARTICLE_SPECIES -%}
85 result = std::min( result, globaldata::{{PARTICLE}}::getSpecies().getMinTimeStepSize() );
91double getMaxTimeStepSize() {
93 {%
for PARTICLE in PARTICLE_SPECIES -%}
94 result = std::max( result, globaldata::{{PARTICLE}}::getSpecies().getMaxTimeStepSize() );
100void startGridConstructionStep() {
105void startIntermediateStep() {
108 {%
for PARTICLE in PARTICLE_SPECIES -%}
109 vertexdata::{{PARTICLE}}Set::clearReassignmentStatistics();
114void startInitialConditionStep() {
115 if (not ::swift2::commandlinesettings::enableDynamicLoadBalancing() ) {
116 loadBalancer.
enable(
false);
122void startInitialisationStep() {
123 if (not ::swift2::commandlinesettings::enableDynamicLoadBalancing() ) {
124 loadBalancer.
enable(
false);
130void startTimeStep() {
132 {%
for PARTICLE in PARTICLE_SPECIES -%}
133 globaldata::{{PARTICLE}}::getSpecies().startTimeStep();
135 vertexdata::{{PARTICLE}}Set::clearReassignmentStatistics();
136 vertexdata::{{PARTICLE}}Set::clearParticleStateStatistics();
142void startPlotStep() {
147void startCleanupStep() {
152void finishTimeStep() {
155 {%
for PARTICLE in PARTICLE_SPECIES -%}
156 globaldata::{{PARTICLE}}::getSpecies().finishTimeStep();
157 vertexdata::{{PARTICLE}}Set::reduceParticleStateStatistics();
158 logInfo(
"finishTimeStep()", vertexdata::{{PARTICLE}}Set::printParticleStateStatistics() );
167 ")\t(unrefined/refined)"
172 ")\t(unrefined/refined)"
182void finishGridConstructionStep() {
188void finishInitialisationStep() {
189 {%
for PARTICLE in PARTICLE_SPECIES -%}
190 vertexdata::{{PARTICLE}}Set::reduceReassignmentStatistics();
191 vertexdata::{{PARTICLE}}Set::reduceParticleStateStatistics();
199void finishInitialConditionStep() {
200 {%
for PARTICLE in PARTICLE_SPECIES -%}
201 vertexdata::{{PARTICLE}}Set::clearReassignmentStatistics();
202 vertexdata::{{PARTICLE}}Set::clearParticleStateStatistics();
210void finishPlotStep() {
215void finishCleanupStep() {
220void finishIntermediateStep() {
221 {%
for PARTICLE in PARTICLE_SPECIES -%}
222 vertexdata::{{PARTICLE}}Set::reduceReassignmentStatistics();
223 if (vertexdata::{{PARTICLE}}Set::registeredAnyResorting()) {
224 logInfo(
"finishIntermediateStep()", vertexdata::{{PARTICLE}}Set::printReassignmentStatistics() );
230{%
for item in NAMESPACE -%}
#define logTraceOut(methodName)
#define logTraceIn(methodName)
#define logInfo(methodName, logMacroMessageStream)
Wrapper macro around tarch::tarch::logging::Log to improve logging.
static SpacetreeSet & getInstance()
tarch::logging::Log _log("exahype2::fv")