Peano
Loading...
Searching...
No Matches
Project.SolverRepository.template.cpp
Go to the documentation of this file.
1
#include "SolverRepository.h"
2
#include "
exahype2/LoadBalancingConfiguration.h
"
3
#include "
peano4/grid/grid.h
"
4
#include "
tarch/multicore/Core.h
"
5
#include "
peano4/parallel/SpacetreeSet.h
"
6
#include "
tarch/logging/Log.h
"
7
#include "
tarch/multicore/orchestration/Hardcoded.h
"
8
9
10
{%
for
N
in NAMESPACE %}
11
namespace
{{
N
}} {
12
{% endfor %}
13
namespace
repositories {
14
static
tarch::logging::Log
_log
(
"{{NAMESPACE | join("
::
")}}"
);
15
16
{%
for
SOLVER in SOLVER_INSTANCES %}
17
{{SOLVER[0]}} {{SOLVER[1]}};
18
{% endfor %}
19
20
{%
if
LOAD_BALANCER !=
""
%}
21
{{LOAD_BALANCER}} loadBalancer({{LOAD_BALANCER_ARGUMENTS}});
22
{%
else
%}
23
toolbox::loadbalancing::strategies::NoLoadBalancing
loadBalancer;
24
{% endif %}
25
{%
for
SOLVER in AUX_SOLVER_INSTANCES %}
26
{{SOLVER[0]}} {{SOLVER[1]}};
27
{% endfor %}
28
29
bool
terminationCriterionHolds() {
30
/*
31
Return true if all solvers returns true.
32
33
We don't test the aux solvers here.
34
*/
35
bool
output =
true
;
36
{%
for
SOLVER in SOLVER_INSTANCES %}
37
output &= {{SOLVER[1]}}.terminationCriterionHolds();
38
{% endfor %}
39
return
output;
40
}
41
42
43
void
beginMeshSweep() {
44
{%
for
SOLVER in SOLVER_INSTANCES %}
45
{{SOLVER[1]}}.beginMeshSweep();
46
{% endfor %}
47
{%
for
SOLVER in AUX_SOLVER_INSTANCES %}
48
{{SOLVER[1]}}.beginMeshSweep();
49
{% endfor %}
50
}
51
52
void
endMeshSweep() {
53
{%
for
SOLVER in SOLVER_INSTANCES %}
54
{{SOLVER[1]}}.endMeshSweep();
55
{% endfor %}
56
{%
for
SOLVER in AUX_SOLVER_INSTANCES %}
57
{{SOLVER[1]}}.endMeshSweep();
58
{% endfor %}
59
}
60
61
void
endCreateGrid() {
62
loadBalancer.
finishStep
();
63
tarch::multicore::setOrchestration
( {{MULTICORE_ORCHESTRATION}} );
64
}
65
66
void
incrementPlotCounter() {plotCounter++;}
67
int
getPlotCounter() {
68
return
plotCounter;
69
}
70
}
71
{%
for
N
in NAMESPACE %}
72
}
73
{% endfor %}
74
Core.h
LoadBalancingConfiguration.h
Log.h
_log
tarch::logging::Log _log("::")
SpacetreeSet.h
tarch::logging::Log
Log Device.
Definition
Log.h:516
toolbox::loadbalancing::strategies::NoLoadBalancing
No load balancing.
Definition
NoLoadBalancing.h:26
toolbox::loadbalancing::strategies::NoLoadBalancing::finishStep
virtual void finishStep() override
Finish a mesh sweep.
Definition
NoLoadBalancing.cpp:23
tarch::multicore::setOrchestration
void setOrchestration(tarch::multicore::orchestration::Strategy *realisation)
Definition
multicore.cpp:56
tbb::detail::d1::N
N
Definition
blocked_rangeNd.h:55
grid.h
Hardcoded.h
src
mghype
matrixfree
api
Project.SolverRepository.template.cpp
Generated on Thu Jul 10 2025 08:04:54 for Peano by
1.10.0