Peano
Loading...
Searching...
No Matches
AbstractRKFD4ActionSet.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 peano4.api.solversteps.ActionSet import ActionSet
4
5
7 """!
8
9 Base class of the action sets of @ref exahype2.api.rkfd4 which work
10 against the solver
11
12 It memorises the solver and provides the includes all of these action
13 sets need.
14
15 """
16
17 def __init__(self, solver):
18 """!
19
20 @param solver: exahype2.api.Solver
21 The solver the action set works for.
22
23 """
24 super().__init__(descend_invocation_order=1, parallel=False)
25 self._solver = solver
26
28 """!
29
30 You should replicate this function in each subclass, so you get
31 meaningful action set names (otherwise, it will be
32 AbstractRKFD4ActionSet0,1,2,...).
33
34 """
35 return __name__.replace(".py", "").replace(".", "_")
36
38 return False
39
40 def get_includes(self):
41 """!
42 The includes cover the kernels the numerical scheme generates (@ref
43 exahype2.api.rkfd4.CentralDifferencesWithRungeKutta), so all action
44 sets can invoke them.
45 """
46 return (
47 f"""
48#include <algorithm>
49#include <functional>
50#include "exahype2/CellData.h"
51#include "exahype2/fd/PatchUtils.h"
52#include "kernels/{self._solver.name}_fd4.h"
53#include "kernels/rungekutta_linear_combination.h"
54"""
55 + self._solver._get_default_includes()
56 + self._solver.user_solver_includes
57 )
Base class of the action sets of exahype2.api.rkfd4 which work against the solver.
get_action_set_name(self)
You should replicate this function in each subclass, so you get meaningful action set names (otherwis...
get_includes(self)
The includes cover the kernels the numerical scheme generates (exahype2.api.rkfd4....
Action set (reactions to events)
Definition ActionSet.py:6