|
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) | |
| Make a reconstruction task of a solver fill the halos of the solver's auxiliary variables. | |
| use_halos_of_auxiliary_variables (task, solver) | |
| 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 453 of file AuxiliaryVariables.py.
| exahype2.api.AuxiliaryVariables.add_reconstruction_of_auxiliary_variables | ( | task, | |
| solver | |||
| ) |
Make a reconstruction task of a solver fill the halos of the solver's auxiliary variables.
| task | peano4.api.taskgraph.Task The task which also reconstructs the unknowns. |
Definition at line 342 of file AuxiliaryVariables.py.
| 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 427 of file AuxiliaryVariables.py.
References exahype2.api.AuxiliaryVariables.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 385 of file AuxiliaryVariables.py.
References exahype2.api.AuxiliaryVariables.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 439 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 258 of file AuxiliaryVariables.py.
References exahype2.api.AuxiliaryVariables.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 293 of file AuxiliaryVariables.py.
References exahype2.api.AuxiliaryVariables.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 315 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 249 of file AuxiliaryVariables.py.
Referenced by exahype2.api.AuxiliaryVariables.extend_signature(), and exahype2.api.AuxiliaryVariables.forwarding_arguments().

| exahype2.api.AuxiliaryVariables.use_halos_of_auxiliary_variables | ( | task, | |
| solver | |||
| ) |
Let a task (typically the update of the cells) read the halos of the auxiliary variables.
Definition at line 370 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 379 of file AuxiliaryVariables.py.
Referenced by exahype2.api.AuxiliaryVariables.code_to_allocate_kernel_output(), and exahype2.api.AuxiliaryVariables.code_to_assemble_kernel_input().
