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 split_sweeps=False,
17 ):
18 super(SingleSweep, self).__init__(
19 name,
20 order,
21 unknowns,
22 auxiliary_variables,
23 min_cell_h,
24 max_cell_h,
25 plot_grid_properties,
26 )
27
29
30 # If turned on it turns the solver from a single sweep to a separate sweeps solver,
31 # i.e. the predictor and corrector steps occur on separate traversals of the domain.
32 # this can be useful for debugging, or for some additional features such as limiting.
33 self._split_sweeps = split_sweeps
34
37
39 super(SingleSweep, self).create_data_structures()
40
42 "("
43 + "repositories::"
45 + ".getSolverState()=="
46 + self._name
47 + "::SolverState::GridInitialisation"
48 + ")"
49 )
51 "("
52 + "repositories::"
54 + ".getSolverState()=="
55 + self._name
56 + "::SolverState::InitialPrediction or "
57 + "(repositories::"
59 + ".getSolverState()=="
60 + self._name
61 + "::SolverState::Plotting"
62 + " and repositories::"
64 + ".getMinTimeStamp()==0.))"
65 )
66
67 self._rhs_estimates_projection.generator.send_condition = (
68 "repositories::"
70 + ".isFirstGridSweepOfTimeStep() or "
71 + "repositories::"
73 + ".getSolverState()=="
74 + self._name
75 + "::SolverState::PredictionOnHangingCells or "
76 + "repositories::"
78 + ".getSolverState()=="
79 + self._name
80 + "::SolverState::Plotting"
81 )
82
83 self._rhs_estimates_projection.generator.receive_and_merge_condition = (
84 "repositories::"
86 + ".getSolverState()=="
87 + self._name
88 + "::SolverState::PredictionOnHangingCells or "
89 + "repositories::"
91 + ".isLastGridSweepOfTimeStep()"
92 )
93
94 self._flux_estimates_projection.generator.send_condition = (
95 "repositories::"
97 + ".isFirstGridSweepOfTimeStep() or "
98 + "repositories::"
100 + ".getSolverState()=="
101 + self._name
102 + "::SolverState::PredictionOnHangingCells or "
103 + "repositories::"
105 + ".getSolverState()=="
106 + self._name
107 + "::SolverState::Plotting"
108 )
109
110 self._flux_estimates_projection.generator.receive_and_merge_condition = (
111 "repositories::"
113 + ".getSolverState()=="
114 + self._name
115 + "::SolverState::PredictionOnHangingCells or "
116 + "repositories::"
118 + ".isLastGridSweepOfTimeStep()"
119 )
120
122 super(SingleSweep, self).create_action_sets()
123
124 self._action_set_prediction.guard = (
126 + " and not isHangingCell"
127 + " and repositories::{}.isFirstGridSweepOfTimeStep()".format(
129 )
130 )
131
132 self._action_set_prediction_on_hanging_cells.guard = self._store_cell_data_default_guard() + " and repositories::{}.getSolverState()=={}::SolverState::PredictionOnHangingCells and isHangingCell".format(
134 )
135
136 self._action_set_correction.guard = (
138 + " and repositories::{}.isLastGridSweepOfTimeStep()".format(
140 )
141 )
142
143 self._action_set_correction.riemann_guard = (
145 + " and repositories::{}.isLastGridSweepOfTimeStep()".format(
147 )
148 + " and not fineGridFace"
149 + self._name
150 + "FaceLabel.getAboveHanging()"
151 )
152
154 return (
155 super(SingleSweep, self).get_user_action_set_includes()
156 + """
157"""
158 )
159
161 return super(
162 SingleSweep, self
163 )._store_boundary_data_default_guard() + " and repositories::{}.isLastGridSweepOfTimeStep()".format(
165 )
166
168 return super(
169 SingleSweep, self
170 )._delete_face_data_default_guard() + " and repositories::{}.isFirstGridSweepOfTimeStep()".format(
172 )
173
175 return super(
176 SingleSweep, self
177 )._restrict_face_data_default_guard() + " and repositories::{}.getSolverState()=={}::SolverState::PredictionOnHangingCells".format(
179 )
180
182 return super(
183 SingleSweep, self
184 )._interpolate_face_data_default_guard() + " and repositories::{}.getSolverState()=={}::SolverState::PredictionOnHangingCells".format(
186 )
187
189 super(
190 SingleSweep, self
192 d["USE_SEPARATE_SWEEPS"] = self._split_sweeps
__init__(self, name, order, unknowns, auxiliary_variables, min_cell_h, max_cell_h, plot_grid_properties=False, split_sweeps=False)