Peano
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1
# This file is part of the Peano project. For conditions of distribution and
2
# use, please see the copyright notice at www.peano-framework.org
3
r"""!
4
5
The Python-side model of "what happens during one mesh sweep"
6
7
A @ref peano4.api.solversteps.Step.Step corresponds to one generated C++
8
Observer, i.e. one grid traversal. It holds the vertex/face/cell data it
9
touches and an ordered list of @ref peano4.api.solversteps.ActionSet.ActionSet
10
instances - the actual "reactions to events" (touch vertex first time,
11
create cell, ...) that get woven into that Observer.
12
@ref peano4.api.solversteps.UserActionSet.UserActionSet is the one action
13
set every Step gets by default: an empty, user-editable stub placed under
14
`actions/` rather than being regenerated every run.
15
16
@ref peano4.api.solversteps.Steps.Steps is the top-level collection: it
17
holds every Step a peano4.api.Project knows about and, via
18
StepsToStepRepository, additionally generates the C++ `StepRepository`
19
that lets the runtime look steps up by name/index at runtime.
20
21
Steps and Step do not write C++ themselves. Each delegates to a private
22
generator held by aggregation: Step to StepToActionSets/StepToObserver,
23
Steps to StepsToStepRepository. Those generators are the bridge into
24
@ref peano4.api.output "peano4.api.output" - the actual C++ code writers -
25
turning one Python-side ActionSet/Step/Steps object into a
26
peano4.api.output.ActionSet/Observer/TemplatedHeaderImplementationFilePair
27
that is what ends up on disk.
28
29
\dot
30
digraph SolverStepsClasses {
31
rankdir=BT
32
fontname="Helvetica"
33
node [shape=record, fontname="Helvetica", fontsize=10]
34
edge [fontname="Helvetica", fontsize=9]
35
36
ActionSet [label="{«abstract»\nActionSet|+ descend_invocation_order : int\l+ parallel : bool\l|+ get_guard_of_operation(name) : str\l+ get_body_of_operation(name) : str\l+ get_implementation_of_operation(name) : str\l+ get_action_set_name() : str\l+ user_should_modify_template() : bool\l+ get_attributes() : str\l+ get_includes() : str\l}"]
37
UserActionSet [label="{UserActionSet|+ name : str\l}"]
38
Step [label="{Step|+ name : str\l+ action_sets : [ActionSet]\l+ vertex_data, face_data, cell_data : [...]\l|+ add_action_set(action_set) : void\l+ construct_output(output) : void\l}"]
39
Steps [label="{Steps|+ _steps : [Step]\l|+ add_step(step) : void\l+ construct_output(output) : void\l}"]
40
StepToActionSets [label="{StepToActionSets|+ step : Step\l|+ construct_output(output, action_set) : str\l}"]
41
StepToObserver [label="{StepToObserver|+ step : Step\l|+ construct_output(output, included_action_sets) : void\l}"]
42
StepsToStepRepository [label="{StepsToStepRepository|+ steps : Steps\l|+ construct_output(output) : void\l}"]
43
44
OutputActionSet [label="{«external»\npeano4.api.output.ActionSet}", style=dashed]
45
OutputObserver [label="{«external»\npeano4.api.output.Observer}", style=dashed]
46
OutputTemplatePair [label="{«external»\npeano4.api.output.TemplatedHeaderImplementationFilePair}", style=dashed]
47
48
edge [arrowhead=empty, style=solid, dir=forward]
49
UserActionSet -> ActionSet
50
51
edge [dir=both, arrowtail=diamond, arrowhead=none, style=solid]
52
Step -> ActionSet [taillabel="1", headlabel="0..*", label="action_sets"]
53
Step -> StepToActionSets [taillabel="1", headlabel="1", label="action_set_generator"]
54
Step -> StepToObserver [taillabel="1", headlabel="1", label="observer_generator"]
55
Steps -> Step [taillabel="1", headlabel="0..*", label="_steps"]
56
Steps -> StepsToStepRepository [taillabel="1", headlabel="1", label="generator"]
57
58
edge [dir=forward, arrowhead=open, arrowtail=none, style=solid]
59
StepToActionSets -> Step [label="step"]
60
StepToObserver -> Step [label="step"]
61
StepsToStepRepository -> Steps [label="steps"]
62
63
edge [dir=forward, arrowhead=vee, arrowtail=none, style=dashed]
64
StepToActionSets -> OutputActionSet [label="«creates»"]
65
StepToObserver -> OutputObserver [label="«creates»"]
66
StepsToStepRepository -> OutputTemplatePair [label="«creates»"]
67
}
68
\enddot
69
70
Solid hollow-triangle arrows are inheritance (UserActionSet extends
71
ActionSet); diamond-ended lines are aggregation/composition (a Step owns
72
its list of action sets and its two generators; a Steps owns its list of
73
Steps and its one generator); open-arrow solid lines are the plain
74
back-references the generators keep to the object they serve; dashed
75
open arrows are "creates" dependencies into @ref peano4.api.output.
76
77
@see @ref peano4.api.solversteps.Step.Step
78
@see @ref peano4.api.solversteps.Steps.Steps
79
@see @ref peano4.api.solversteps.ActionSet.ActionSet
80
@see @ref peano4.api.solversteps.UserActionSet.UserActionSet
81
@see @ref peano4.api.output.ActionSet.ActionSet
82
83
"""
84
85
from
.Step
import
Step
86
from
.Steps
import
Steps
87
from
.ActionSet
import
ActionSet
88
from
.UserActionSet
import
UserActionSet
89
from
.SynchroniseActionSets
import
SynchroniseActionSets, get_task_groups
src
peano4
api
solversteps
__init__.py
Generated on Tue Nov 3 2026 16:05:41 for Peano by
1.9.8