Peano
Loading...
Searching...
No Matches
SingleSweep.py
Go to the documentation of this file.
1# This file is part of the ExaHyPE2 project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from .ADERDG import ADERDG
4
5
8 self,
9 name,
10 order,
11 unknowns,
12 auxiliary_variables,
13 min_cell_h,
14 max_cell_h,
15 plot_grid_properties=False,
16 ):
17 super(SingleSweep, self).__init__(
18 name,
19 order,
20 unknowns,
21 auxiliary_variables,
22 min_cell_h,
23 max_cell_h,
24 plot_grid_properties,
25 )
26
28
29 # If turned on it turns the solver from a single sweep to a separate sweeps solver,
30 # i.e. the predictor and corrector steps occur on separate traversals of the domain.
31 # this can be useful for debugging, or for some additional features such as limiting.
32 self._split_sweeps = False
33
36
38 super(SingleSweep, self).create_data_structures()
39
41 "("
42 + "repositories::"
44 + ".getSolverState()=="
45 + self._name
46 + "::SolverState::GridInitialisation"
47 + ")"
48 )
50 "("
51 + "repositories::"
53 + ".getSolverState()=="
54 + self._name
55 + "::SolverState::InitialPrediction or "
56 + "(repositories::"
58 + ".getSolverState()=="
59 + self._name
60 + "::SolverState::Plotting"
61 + " and repositories::"
63 + ".getMinTimeStamp()==0.))"
64 )
65
66 self._rhs_estimates_projection.generator.send_condition = (
67 "repositories::"
69 + ".isFirstGridSweepOfTimeStep() or "
70 + "repositories::"
72 + ".getSolverState()=="
73 + self._name
74 + "::SolverState::PredictionOnHangingCells or "
75 + "repositories::"
77 + ".getSolverState()=="
78 + self._name
79 + "::SolverState::Plotting"
80 )
81
82 self._rhs_estimates_projection.generator.receive_and_merge_condition = (
83 "repositories::"
85 + ".getSolverState()=="
86 + self._name
87 + "::SolverState::PredictionOnHangingCells or "
88 + "repositories::"
90 + ".isLastGridSweepOfTimeStep()"
91 )
92
93 self._flux_estimates_projection.generator.send_condition = (
94 "repositories::"
96 + ".isFirstGridSweepOfTimeStep() or "
97 + "repositories::"
99 + ".getSolverState()=="
100 + self._name
101 + "::SolverState::PredictionOnHangingCells or "
102 + "repositories::"
104 + ".getSolverState()=="
105 + self._name
106 + "::SolverState::Plotting"
107 )
108
109 self._flux_estimates_projection.generator.receive_and_merge_condition = (
110 "repositories::"
112 + ".getSolverState()=="
113 + self._name
114 + "::SolverState::PredictionOnHangingCells or "
115 + "repositories::"
117 + ".isLastGridSweepOfTimeStep()"
118 )
119
121 super(SingleSweep, self).create_action_sets()
122
123 self._action_set_prediction.guard = (
125 + " and not isHangingCell"
126 + " and repositories::{}.isFirstGridSweepOfTimeStep()".format(
128 )
129 )
130
131 self._action_set_prediction_on_hanging_cells.guard = self._store_cell_data_default_guard() + " and repositories::{}.getSolverState()=={}::SolverState::PredictionOnHangingCells and isHangingCell".format(
133 )
134
135 self._action_set_correction.guard = (
137 + " and repositories::{}.isLastGridSweepOfTimeStep()".format(
139 )
140 )
141
142 self._action_set_correction.riemann_guard = (
144 + " and repositories::{}.isLastGridSweepOfTimeStep()".format(
146 )
147 + " and not fineGridFace"
148 + self._name
149 + "FaceLabel.getAboveHanging()"
150 )
151
153 return (
154 super(SingleSweep, self).get_user_action_set_includes()
155 + """
156"""
157 )
158
160 return super(
161 SingleSweep, self
162 )._store_boundary_data_default_guard() + " and repositories::{}.isLastGridSweepOfTimeStep()".format(
164 )
165
167 return super(
168 SingleSweep, self
169 )._delete_face_data_default_guard() + " and repositories::{}.isFirstGridSweepOfTimeStep()".format(
171 )
172
174 return super(
175 SingleSweep, self
176 )._restrict_face_data_default_guard() + " and repositories::{}.getSolverState()=={}::SolverState::PredictionOnHangingCells".format(
178 )
179
181 return super(
182 SingleSweep, self
183 )._interpolate_face_data_default_guard() + " and repositories::{}.getSolverState()=={}::SolverState::PredictionOnHangingCells".format(
185 )
186
188 super(
189 SingleSweep, self
191 d["USE_SEPARATE_SWEEPS"] = self._split_sweeps
__init__(self, name, order, unknowns, auxiliary_variables, min_cell_h, max_cell_h, plot_grid_properties=False)