|
Peano
|
Solver for the Einstein equations in the first-order CCZ4 formulation. More...


Public Member Functions | |
| __init__ (self, str name, Dict[str, Union[int, float]] parameters=None) | |
| Create a first-order CCZ4 solver. | |
| Public Member Functions inherited from exagrype.api.CCZ4SolverBase.CCZ4SolverBase | |
| __init__ (self, str name, Dict[str, int] unknowns, Dict[str, Union[int, float]] parameters=None) | |
| Create a CCZ4 solver. | |
| List[str] | advected_quantities (self) |
| The unknowns whose advection terms the kernels of exagrype.ccz4 leave out. | |
| bool | ncp_adds_advection (self) |
| Whether the non-conservative product has to add the advection terms. | |
| enforce_ccz4_constraint (self, "CCZ4SolverBase.EnforceCCZ4Constraint" value) | |
| Set when the solver pushes the solution back onto the CCZ4 constraints. | |
| generate_solver_realisation (self, exahype2_project, peano_project, setup_simulation, time_step, plot, mesh_adaptation, add_global_tasks=True) | |
| Create the solver's task graphs and insert the constraint enforcement. | |
| Dict[str, Union[int, float]] | parameters (self) |
| The CCZ4 parameters the solver is generated with (read-only copy). | |
| Public Member Functions inherited from exahype2.api.Solver.Solver | |
| __init__ (self, str name, VariableSpecification unknowns) | |
| Create solver. | |
| str | __str__ (self) |
| str | name (self) |
| Unique solver name. | |
| "Solver.NumericalScheme" | numerical_scheme (self) |
| numerical_scheme (self, "Solver.NumericalScheme" value) | |
| List["Solver.Plotter"] | plotters (self) |
| All plotters of the solver, in the order they have been added. | |
| add_plotter (self, "Solver.Plotter" plotter) | |
| Add a plotter to the solver. | |
| "Solver.Plotter" | plotter (self) |
| Shorthand for solvers with at most one plotter. | |
| plotter (self, "Solver.Plotter" value) | |
| int | unknowns (self) |
| List["AuxiliaryVariables"] | auxiliary_variables (self) |
| All sets of auxiliary variables in the order they have been attached. | |
| int | number_of_auxiliary_variables (self) |
| Total number of entries of all sets of auxiliary variables. | |
| int | auxiliary_variable_offset (self, "AuxiliaryVariables" auxiliary) |
| Offset of the first entry of a set within the buffer the compute kernels work on, i.e. | |
| add_auxiliary_variables (self, "AuxiliaryVariables" auxiliary) | |
| Attach a set of auxiliary variables to the solver. | |
| str | signature_of (self, PDETerm term) |
| The signature of a PDE term including the pointers to the auxiliary variables. | |
| str | user_solver_includes (self) |
| Add further includes to this property, if your solver requires some additional routines from other header files. | |
| add_user_solver_includes (self, str value) | |
| Add further includes to this property, if your solver requires some additional routines from other header files. | |
| set_solver_constants (self, str datastring) | |
| add_solver_constants (self, str datastring) | |
| List[str] | variable_names_per_entry (self) |
| One name per entry of Q, i.e. | |
| str | get_name_of_global_instance (self) |
| List[PDETerm] | pde_terms (self) |
| All PDE terms (flux, eigenvalues, ...) registered with this solver, in registration order. | |
| bool | requires_user_class (self) |
| True iff at least one PDE term has no implementation. | |
| str | get_name_of_solver_class (self) |
| Name of the C++ class the solver repository instantiates: <SolverName> if requires_user_class, Abstract<SolverName> otherwise. | |
| add_pde_term (self, PDETerm term) | |
| Register a PDE term with this solver, or replace the one already registered under the same name and statelessness. | |
| remove_pde_term (self, str name, bool stateless=False) | |
| Remove a previously registered PDE term by name and statelessness. | |
| PDETerm | get_pde_term (self, str name, bool stateless=False) |
| Look up a previously registered PDE term by name and statelessness. | |
| add_abstract_solver_attribute (self, str declaration) | |
| Add a raw C++ member attribute declaration to the generated Abstract<SolverName> class (. | |
| add_abstract_solver_method (self, str declaration, Callable[[str], str] definition_generator) | |
| Add a raw C++ method to the generated Abstract<SolverName> class: declaration goes into the class body (public section), verbatim. | |
| str | create_readme_descriptor (self, domain_offset, domain_size) |
| Return a human-readable description of this solver instance, to be embedded into the generated project's README. | |
Static Public Attributes | |
| dict | Unknowns |
| Static Public Attributes inherited from exagrype.api.CCZ4SolverBase.CCZ4SolverBase | |
| int | NUMBER_OF_CCZ4_ENTRIES = 58 |
| DefaultParameters | |
| tuple | Switches = ("CCZ4LapseType", "CCZ4b", "CCZ4s") |
| str | ADVECTION_VELOCITY = "shift" |
| Static Public Attributes inherited from exahype2.api.Solver.Solver | |
| str | SolutionUpdateTaskTag = "exahype2.api.Solver.SolutionUpdateTaskTag" |
| Tag of all tasks which write a new solution. | |
| str | IntermediateSolutionUpdateTag = "exahype2.api.Solver.IntermediateSolutionUpdateTag" |
| Tag of all tasks which write an intermediate solution. | |
Protected Member Functions | |
| str | _ncp_implementation (self) |
| The secondary entries follow the 25 primary ones. | |
| str | _source_implementation (self) |
| C++ which calls the source term kernel. | |
| Protected Member Functions inherited from exagrype.api.CCZ4SolverBase.CCZ4SolverBase | |
| _advection_indices (self) | |
| Indices of the velocity components (ADVECTION_VELOCITY) and of the advected unknowns (advected_quantities()) within Q, in the form both the lopsided advection of the scheme and exahype2.fd.addCentralAdvection() take them. | |
| _tasks_of_this_solver (self, time_step, tag) | |
| Tasks of time_step which carry tag and belong to this solver, as the graph holds the tasks of all solvers. | |
| _insert_constraint_enforcement (self, time_step, anchors, patch) | |
| Insert the enforcement of the CCZ4 constraints after anchors. | |
| str | _enforcement_implementation (self) |
| C++ which pushes the unknowns Q of one volume back onto the constraints. | |
| _register_pde_terms (self) | |
| Register the source and the maximum eigenvalue. | |
| _register_non_conservative_product (self, bool advection) | |
| Register the non-conservative product, with or without the advection terms. | |
| str | _advection_implementation (self) |
| C++ which adds the advection terms to the non-conservative product. | |
| str | _max_eigenvalue_implementation (self) |
| Protected Member Functions inherited from exahype2.api.Solver.Solver | |
| int | _register_variables (self, VariableSpecification variables, int offset) |
| Translate a plain int or a name-to-multiplicity dict into a total variable count, and - for the dict case - add each name's position within Q to _variable_positions. | |
| str | _get_default_includes (self) |
| Includes every generated action set can rely on being available, regardless of which action sets a concrete discretisation (e.g. | |
| str | _unknown_identifier (self) |
| _add_wants_to_plot_to_solver (self) | |
| Add wantsToPlot() to the solver's C++ class: It holds if any of the solver's plotters is active (exahype2.api.Solver.Solver.Plotter). | |
| _add_checkpoint_meta_data_to_solver (self) | |
| Override exahype2.Solver.toCheckpointMetaData() in the solver's C++ class such that it also writes the attributes added through add_abstract_solver_attribute(), e.g. | |
Additional Inherited Members | |
| Data Fields inherited from exahype2.api.Solver.Solver | |
| solver_generator = SolverToCPPFiles(self) | |
| grid_construction = None | |
| tuple | mesh_adaptation = None |
| Turn this solver specification into a task graph and create the required C++ kernels/stubs. | |
| tuple | grid_selector |
| str | compute_kernel_call = None |
| pde_terms | |
| True iff at least one PDE term has no implementation. | |
| Protected Attributes inherited from exagrype.api.CCZ4SolverBase.CCZ4SolverBase | |
| _enforce_ccz4_constraint = CCZ4SolverBase.EnforceCCZ4Constraint.No | |
| One task after all writers of the new solution: The optimistic Finite Volumes write it in one of two tasks, depending on the cell. | |
| _parameters = dict(self.DefaultParameters) | |
| _non_conservative_product = None | |
| _patch | |
| One task after all writers of the new solution: The optimistic Finite Volumes write it in one of two tasks, depending on the cell. | |
| Protected Attributes inherited from exahype2.api.Solver.Solver | |
| str | _name = name |
| Create solver. | |
| dict | _variable_positions = {} |
| Translate a plain int or a name-to-multiplicity dict into a total variable count, and - for the dict case - add each name's position within Q to _variable_positions. | |
| int | _unknowns = self._register_variables(unknowns, 0) |
| list | _auxiliary_variables = [] |
| All sets of auxiliary variables in the order they have been attached. | |
| str | _user_solver_includes = "" |
| str | _solver_constants = "" |
| dict | _pde_terms = {} |
| list | _abstract_solver_attributes = [] |
| list | _abstract_solver_methods = [] |
| _numerical_scheme = None | |
| list | _plotters = [] |
| Turn this solver specification into a task graph and create the required C++ kernels/stubs. | |
Solver for the Einstein equations in the first-order CCZ4 formulation.
The solver is a plain exahype2.api.Solver with the 58 CCZ4 unknowns and the PDE terms of CCZ4 pre-registered. All terms delegate to the ExaGRyPE library (configure Peano with –enable-exagrype):
The solver has no initial condition. Add one as for any other solver, e.g. a routine of exagrype.api.initialvalues via add_pde_term().
CCZ4 has no conservative flux. You still have to assign a numerical scheme, a grid construction and (optionally) a plotter, exactly as for any other exahype2.api.Solver, and to add the solver to an exahype2.api.Project. The project has to be three-dimensional: the generated solver class refuses to compile otherwise.
Definition at line 12 of file FOCCZ4Solver.py.
| exagrype.api.FOCCZ4Solver.FOCCZ4Solver.__init__ | ( | self, | |
| str | name, | ||
| Dict[str, Union[int, float]] | parameters = None ) |
Create a first-order CCZ4 solver.
| name | str Name of the solver (exahype2.api.Solver). |
| parameters | Dict[str, Union[int, float]] CCZ4 parameters that differ from DefaultParameters, e.g. {"CCZ4k1": 0.0}. Keys which are not in DefaultParameters are rejected, as they most likely are typos. |
Definition at line 95 of file FOCCZ4Solver.py.
References __init__(), exagrype.api.euler.Euler.Euler.Unknowns, and Unknowns.
Referenced by __init__().


|
protected |
The secondary entries follow the 25 primary ones.
Reimplemented from exagrype.api.CCZ4SolverBase.CCZ4SolverBase.
Definition at line 115 of file FOCCZ4Solver.py.
Referenced by solvers.fv.FV.FV.__str__().

|
protected |
C++ which calls the source term kernel.
Hook for the subclasses.
Reimplemented from exagrype.api.CCZ4SolverBase.CCZ4SolverBase.
Definition at line 126 of file FOCCZ4Solver.py.
|
static |
Definition at line 66 of file FOCCZ4Solver.py.
Referenced by __init__(), exagrype.api.FOSOCCZ4Solver.FOSOCCZ4Solver.__init__(), exagrype.api.scalarfield.ScalarField.ScalarField.__init__(), exagrype.api.FOSOCCZ4Solver.FOSOCCZ4Solver._number_of_evolved_entries(), exagrype.api.CCZ4SolverBase.CCZ4SolverBase.advected_quantities(), and exagrype.api.FOSOCCZ4Solver.FOSOCCZ4Solver.advected_quantities().