|
Peano
|
Data Structures | |
| class | AuxiliaryVariables |
| A set of auxiliary variables of a solver. More... | |
Functions | |
| List[str] | split_signature (str signature) |
| Split a C++ parameter list at the commas that are not within template brackets. | |
| str | extend_signature (str signature, solver) |
| Add the pointers to the auxiliary variables of a solver to a PDE term's signature. | |
| List[str] | forwarding_arguments (str signature, solver) |
| Arguments to call the version of a PDE term with auxiliary variables from a caller that holds the original signature. | |
| register_auxiliary_variables (solver, peano_project, int patch_size, int overlap) | |
| Create and register the data of all auxiliary variables of a solver. | |
| add_reconstruction_of_auxiliary_variables (task, solver, auxiliaries=None) | |
| Make a reconstruction task of a solver fill the halos of the solver's auxiliary variables. | |
| add_reconstruction_tasks_of_auxiliary_variables (solver, time_step, interpolation, predecessors=(), name_suffix="", auxiliaries=None) | |
| Add the tasks that interpolate and reconstruct the auxiliary variables. | |
| use_halos_of_auxiliary_variables (task, solver, access=None, held_access=None) | |
| Let a task (typically the update of the cells) read the halos of the auxiliary variables. | |
| str | volumes_expression (int patch_size, int halo) |
| C++ expression for the number of volumes of a patch with halo. | |
| str | code_to_assemble_kernel_input (solver, str buffer, str unknowns, int halo_size, parameters_of=None) |
| C++ code which assembles the input buffer of the compute kernels. | |
| str | code_to_allocate_kernel_output (solver, str buffer) |
| C++ code which defines the output buffer (a std.vector<double>) of the compute kernels. | |
| str | code_to_copy_back_kernel_output (solver, str buffer, str unknowns) |
| C++ code which copies the unknowns of the output buffer back into the patch. | |
| add_auxiliary_variables_to_setup (solver, initial_condition_task, project_on_faces_task, project_patch_onto_faces, roll_over_updated_face) | |
| Let the setup of a solver write its auxiliary variables. | |
| exahype2.api.AuxiliaryVariables.add_auxiliary_variables_to_setup | ( | solver, | |
| initial_condition_task, | |||
| project_on_faces_task, | |||
| project_patch_onto_faces, | |||
| roll_over_updated_face ) |
Let the setup of a solver write its auxiliary variables.
Auxiliary variables are written once, by their owner: the owner initialises them in its initial condition task and projects them onto the faces, so the halos can be reconstructed later on. A solver that merely shares a set reads it after the owner has written it.
| project_patch_onto_faces | class The action set that projects a patch onto the faces (exahype2.api.fv.actionsets.ProjectPatchOntoFaces). |
| roll_over_updated_face | class The action set that rolls the projection over (exahype2.api.fv.actionsets.RollOverUpdatedFace). |
Definition at line 664 of file AuxiliaryVariables.py.
| exahype2.api.AuxiliaryVariables.add_reconstruction_of_auxiliary_variables | ( | task, | |
| solver, | |||
| auxiliaries = None ) |
Make a reconstruction task of a solver fill the halos of the solver's auxiliary variables.
| task | peano4.api.taskgraph.Task The task which reconstructs the halos. |
| auxiliaries | List[AuxiliaryVariables] The sets to reconstruct. Defaults to all sets of the solver. |
Definition at line 457 of file AuxiliaryVariables.py.
Referenced by add_reconstruction_tasks_of_auxiliary_variables().

| exahype2.api.AuxiliaryVariables.add_reconstruction_tasks_of_auxiliary_variables | ( | solver, | |
| time_step, | |||
| interpolation, | |||
| predecessors = (), | |||
| name_suffix = "", | |||
| auxiliaries = None ) |
Add the tasks that interpolate and reconstruct the auxiliary variables.
Each set of auxiliary variables gets a task of its own that interpolates its coarse face data onto the hanging faces and reconstructs its halo (register_auxiliary_variables() rejects cell-wise sets). Interpolation is no task of its own, see src/exahype2/api/adrs/0001-interpolation-and-restriction-ride-along-with-face-users.md. All tasks depend on the predecessors only, i.e. the reconstructions of all sets (and of the unknowns, which the caller creates) run in parallel.
| solver | exahype2.api.Solver The solver whose sets are reconstructed. |
| time_step | peano4.api.taskgraph.Graph Receives the tasks. |
| interpolation | toolbox.blockstructured.api.InterpolateHangingFaces.Scheme Interpolation scheme. |
| predecessors | List[peano4.api.taskgraph.Task] Tasks which the new tasks wait for. |
| name_suffix | str Appended to the names of the tasks, e.g. " stage 1". |
| auxiliaries | List[AuxiliaryVariables] The sets to reconstruct. Defaults to all sets of the solver. A scheme with several stages passes only the sets whose halo has not been held through the stages (AuxiliaryVariables.halo_is_held_through_stages). |
Definition at line 491 of file AuxiliaryVariables.py.
References add_reconstruction_of_auxiliary_variables().

| str exahype2.api.AuxiliaryVariables.code_to_allocate_kernel_output | ( | solver, | |
| str | buffer ) |
C++ code which defines the output buffer (a std.vector<double>) of the compute kernels.
Definition at line 638 of file AuxiliaryVariables.py.
References volumes_expression().

| str exahype2.api.AuxiliaryVariables.code_to_assemble_kernel_input | ( | solver, | |
| str | buffer, | ||
| str | unknowns, | ||
| int | halo_size, | ||
| parameters_of = None ) |
C++ code which assembles the input buffer of the compute kernels.
The kernels work on one buffer that holds the unknowns of a volume followed by the entries of all sets of auxiliary variables. The code defines a std.vector<double> named buffer. It is empty if the solver has no auxiliary variables.
| unknowns | str C++ expression for the unknowns of the patch with halo. |
| parameters_of | function Maps a set onto the C++ expression of its patch with halo. Defaults to the halo patches of the solver. |
Definition at line 592 of file AuxiliaryVariables.py.
References volumes_expression().

| str exahype2.api.AuxiliaryVariables.code_to_copy_back_kernel_output | ( | solver, | |
| str | buffer, | ||
| str | unknowns ) |
C++ code which copies the unknowns of the output buffer back into the patch.
Definition at line 650 of file AuxiliaryVariables.py.
| str exahype2.api.AuxiliaryVariables.extend_signature | ( | str | signature, |
| solver ) |
Add the pointers to the auxiliary variables of a solver to a PDE term's signature.
Each argument named Q is followed by one pointer per set, each argument named deltaQ is followed by one pointer to the jump of each set. The pointers are non-const iff Q is non-const (the initial condition) and the solver owns the set.
| signature | str The signature without auxiliary variables |
| solver | exahype2.api.Solver |
Definition at line 356 of file AuxiliaryVariables.py.
References split_signature().

| List[str] exahype2.api.AuxiliaryVariables.forwarding_arguments | ( | str | signature, |
| solver ) |
Arguments to call the version of a PDE term with auxiliary variables from a caller that holds the original signature.
The caller's Q (and deltaQ) points to a volume in a buffer which hosts the unknowns followed by the entries of all auxiliary variables (the layout the compute kernels work on). The auxiliary variables are slices of this buffer.
Definition at line 395 of file AuxiliaryVariables.py.
References split_signature().

| exahype2.api.AuxiliaryVariables.register_auxiliary_variables | ( | solver, | |
| peano_project, | |||
| int | patch_size, | ||
| int | overlap ) |
Create and register the data of all auxiliary variables of a solver.
The persistent data of a set (its patch and the face overlaps) exists only once, even if several solvers share it. Each solver gets its own temporary patch with halo per set (solver._auxiliary_variable_halos, a dict from the name of the set to the patch), so concurrently running solvers do not overwrite each other's halos.
Definition at line 419 of file AuxiliaryVariables.py.
| List[str] exahype2.api.AuxiliaryVariables.split_signature | ( | str | signature | ) |
Split a C++ parameter list at the commas that are not within template brackets.
Definition at line 347 of file AuxiliaryVariables.py.
Referenced by extend_signature(), and forwarding_arguments().

| exahype2.api.AuxiliaryVariables.use_halos_of_auxiliary_variables | ( | task, | |
| solver, | |||
| access = None, | |||
| held_access = None ) |
Let a task (typically the update of the cells) read the halos of the auxiliary variables.
| access | peano4.api.taskgraph.Task.DataAccess How the task uses the halos. Defaults to READ_AND_DISCARD. Pass another qualifier if the halos have to survive the task, e.g. because a later task of the same chain reads them, too. |
| held_access | peano4.api.taskgraph.Task.DataAccess How the task uses the halos of the sets whose halo is held through the stages of a time step (AuxiliaryVariables.halo_is_held_through_stages). Defaults to access. Schemes with several stages pass a qualifier that keeps the halo alive unless the task belongs to the last stage. |
Definition at line 557 of file AuxiliaryVariables.py.
| str exahype2.api.AuxiliaryVariables.volumes_expression | ( | int | patch_size, |
| int | halo ) |
C++ expression for the number of volumes of a patch with halo.
Definition at line 586 of file AuxiliaryVariables.py.
Referenced by code_to_allocate_kernel_output(), and code_to_assemble_kernel_input().
