Peano
Loading...
Searching...
No Matches
solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells Class Reference

Use Finite Differences Poisson equation system solver to guide cell labels. More...

Inheritance diagram for solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells:
Collaboration diagram for solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells:

Public Member Functions

 __init__ (self, name, relaxation_coefficient=0.6, right_hand_side=-25.0, min_value=0.0, max_value=1.0, min_threshold=0.4, max_threshold=0.6, plot=False)
 name: string A unique name for the solver.
 __str__ (self)
 create_readme_descriptor (self, domain_offset, domain_size)
 create_data_structures (self)
 Create cell and face data structures required.
 create_action_sets (self)
 Overwrite in subclasses if you wanna create different action sets.
 get_name_of_global_instance (self)
 add_to_Peano4_datamodel (self, datamodel, verbose)
 Add all required data to the Peano4 project's datamodel so it is properly built up.
 add_use_data_statements_to_Peano4_solver_step (self, step)
 Tell Peano what data to move around.
 add_actions_to_init_grid (self, step)
 add_actions_to_create_grid (self, step, evaluate_refinement_criterion)
 It is important to plug into the creation, as this is the place where we get the creational events.
 add_actions_to_plot_solution (self, step, output_path)
 We plot if and only if we are asked to do so.
 add_actions_to_perform_time_step (self, step)
 AMR.
 add_entries_to_text_replacement_dictionary (self, d)
 add_implementation_files_to_project (self, namespace, output, subdirectory="")
 The ExaHyPE2 project will call this operation when it sets up the overall environment.
 name (self)
 postprocess_updated_cell (self)
 postprocess_updated_cell (self, kernel)
 Define a postprocessing routine over the data.

Protected Member Functions

 _unknown_identifier (self)
 _get_default_includes (self)

Protected Attributes

 _name = name
 _relaxation_coefficient = relaxation_coefficient
 _right_hand_side = right_hand_side
 _min_value = min_value
 _max_value = max_value
 _min_threshold = min_threshold
 _max_threshold = max_threshold
 _plot = plot
 _postprocess_updated_cell = None
 _cell_data_model = peano4.api.datamodel.DaStGen2( self._unknown_identifier() )
 _face_data_model = peano4.api.toolbox.multigrid.cellbased.ScalarJacobiWithRediscretisation.construct_face_helper_data(self._cell_data_model)
 _action_set_smoother

Static Private Attributes

 __repr__ = __str__

Detailed Description

Use Finite Differences Poisson equation system solver to guide cell labels.

The most popular application of this solver is to guide limiters: Some codes need to know where to solve their PDE with an alternative more robust (though likely less effective) solver. For this, they solve

\( - \Delta u = f \)

for a fixed right-hand side f with a Jacobi solver. The solution is subject to the constraints

\( u_{\text{min}} \leq u \leq u_{\text{max}} \)

and Dirichlet boundary conditions.

Typically, the solvers than set the value of $u=1$ in regions where they need the limiter. The $u$ value will fade away from these regions, and we can implement the following heuristics with \( u_{\text{min}} < U_{\text{min}} < U_{\text{max}} < u_{\text{max}}\):

  • \( u<U_{\text{min}} \): Solver A is active. Solver B is not active.
  • \( U_{\text{min}} \leq u < \frac{1}{2} ( U_{\text{min}} + U_{\text{max}} )\): Solver A is active and sets the value of solver B which is not active but its solution exists here.
  • \( \frac{1}{2} ( U_{\text{min}} + U_{\text{max}} ) \leq u \leq U_{\text{max}} \): Solver B is active and sets the value of solver A which is not active but its solution exists here.
  • \( U_{\text{max}} < u \): Solver B is active. Solver A is not active.

As we use a Jacobi iterative solver, using this marker within ExaHyPE is equivalent to a heat equation solver which becomes stationary eventually if the areas where \( u=u_{\text{max}} \) is manually set/enforced do not change.

The solver works with a constant right-hand side and is defined over two attributes per cell: There's the actual value (u in the example above) and a marker which switches the Jacobi smoothing on and off per cell. In cells where we fix the value, we toggle the marker so Jacobi updates are disabled.

Usage

To use the marker within your project, add a new solver to your project:

 marker_solver = exahype2.solvers.elliptic.ConstrainedPoissonEquationOnCells( name="ConstrainedPoissonEquationOnCells" )
 project.add_solver( marker_solver )

Definition at line 24 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Constructor & Destructor Documentation

◆ __init__()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.__init__ ( self,
name,
relaxation_coefficient = 0.6,
right_hand_side = -25.0,
min_value = 0.0,
max_value = 1.0,
min_threshold = 0.4,
max_threshold = 0.6,
plot = False )

name: string A unique name for the solver.

This one will be used for all generated classes.

plot: Boolean Clarifies whether a dump of the data should be enriched with grid info (such as enclave status flags), too.

relaxation_coefficient: Double (0< value <1) How quickly should the solution be relaxed against real solution. This is the damping parameter in the Jacobi update scheme and thus has to be bigger than 0 and smaller than 1. If the coefficient approaches 1, you might see oscillations.

right_hand_side: Double (negative) Basically describes how fast the solution is pulled down to 0 once we go away from the AMR transition area.

Definition at line 82 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Member Function Documentation

◆ __str__()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.__str__ ( self)

Definition at line 132 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References peano4.api.output.ActionSet.ActionSet.__class__, peano4.api.output.Jinja2TemplatedHeaderImplementationFilePair.Jinja2TemplatedHeaderImplementationFilePair.__class__, peano4.api.output.TemplatedHeaderFile.TemplatedHeaderFile.__class__, api.solvers.Solver.Solver._name, api.Tree.Tree._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.aderdg.ADERDG.ADERDG._name, solvers.api.Solver.Solver._name, solvers.elliptic.AMRMarker.AMRMarker._name, _name, tarch::services::ServiceRepository::ServiceEntry._name, solvers.elliptic.AMRMarker.AMRMarker._relaxation_coefficient, and _relaxation_coefficient.

◆ _get_default_includes()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._get_default_includes ( self)
protected

Definition at line 262 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Referenced by solvers.fv.FV.FV.create_action_sets().

Here is the caller graph for this function:

◆ _unknown_identifier()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._unknown_identifier ( self)
protected

Definition at line 226 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References api.solvers.Solver.Solver._name, api.Tree.Tree._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.aderdg.ADERDG.ADERDG._name, solvers.api.Solver.Solver._name, solvers.elliptic.AMRMarker.AMRMarker._name, _name, and tarch::services::ServiceRepository::ServiceEntry._name.

Referenced by solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV.add_actions_to_checkpoint_solution(), solvers.fv.FV.FV.add_actions_to_plot_solution(), and solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_actions_to_plot_solution().

Here is the caller graph for this function:

◆ add_actions_to_create_grid()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_actions_to_create_grid ( self,
step,
evaluate_refinement_criterion )

It is important to plug into the creation, as this is the place where we get the creational events.

Definition at line 284 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References solvers.elliptic.AMRMarker.AMRMarker._action_set_smoother, and _action_set_smoother.

◆ add_actions_to_init_grid()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_actions_to_init_grid ( self,
step )

◆ add_actions_to_perform_time_step()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_actions_to_perform_time_step ( self,
step )

AMR.

It is important that we do the inter-grid transfer operators before we apply the boundary conditions.

Definition at line 332 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References solvers.elliptic.AMRMarker.AMRMarker._action_set_smoother, and _action_set_smoother.

◆ add_actions_to_plot_solution()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_actions_to_plot_solution ( self,
step,
output_path )

We plot if and only if we are asked to do so.

Definition at line 295 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References solvers.elliptic.AMRMarker.AMRMarker._action_set_smoother, _action_set_smoother, _cell_data_model, api.solvers.Solver.Solver._name, api.Tree.Tree._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.aderdg.ADERDG.ADERDG._name, solvers.api.Solver.Solver._name, solvers.elliptic.AMRMarker.AMRMarker._name, _name, tarch::services::ServiceRepository::ServiceEntry._name, solvers.elliptic.AMRMarker.AMRMarker._plot, and _plot.

◆ add_entries_to_text_replacement_dictionary()

◆ add_implementation_files_to_project()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_implementation_files_to_project ( self,
namespace,
output,
subdirectory = "" )

The ExaHyPE2 project will call this operation when it sets up the overall environment.

This routine is typically not invoked by a user.

output: peano4.api.output.Output

Definition at line 350 of file ConstrainedPoissonEquationForMarkerOnCells.py.

◆ add_to_Peano4_datamodel()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_to_Peano4_datamodel ( self,
datamodel,
verbose )

Add all required data to the Peano4 project's datamodel so it is properly built up.

Definition at line 234 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References _cell_data_model, _face_data_model, api.solvers.Solver.Solver._name, api.Tree.Tree._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.aderdg.ADERDG.ADERDG._name, solvers.api.Solver.Solver._name, solvers.elliptic.AMRMarker.AMRMarker._name, _name, and tarch::services::ServiceRepository::ServiceEntry._name.

◆ add_use_data_statements_to_Peano4_solver_step()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_use_data_statements_to_Peano4_solver_step ( self,
step )

Tell Peano what data to move around.

Inform Peano4 step which data are to be moved around via the use_cell and use_face commands. This operation is generic from ExaHyPE's point of view, i.e. I use it for all grid sweep types.

Definition at line 249 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References _cell_data_model, and _face_data_model.

◆ create_action_sets()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.create_action_sets ( self)

Overwrite in subclasses if you wanna create different action sets.

Call order and ownership

This operation can be called multiple times. However, only the very last call matters. All previous calls are wiped out.

If you have a hierarchy of solvers, every create_data_structure() should first(!) call its parent version. This way, you always ensure that all data are in place before you continue to alter the more specialised versions. So it is (logically) a top-down (general to specialised) run through all create_data_structure() variants within the inheritance tree.

Postprocessing algorithm

After we have updated the cell, i.e. computed the Poisson equation update, we launch a series of postprocessing steps:

  • We impose the value constraints, i.e. ensure the solution is within min and max.

Definition at line 172 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Referenced by solvers.fv.FV.FV.auxiliary_variables(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.auxiliary_variables(), solvers.fv.FV.FV.interpolation(), solvers.fv.FV.FV.overlap(), solvers.fv.FV.FV.patch_size(), postprocess_updated_cell(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.postprocess_updated_cell_after_final_linear_combination(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.postprocess_updated_cell_after_Runge_Kutta_step(), solvers.fv.FV.FV.postprocess_updated_patch(), solvers.fv.FV.FV.preprocess_reconstructed_patch(), solvers.fv.FV.FV.restriction(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.set_implementation(), solvers.fv.FV.FV.switch_storage_scheme(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.switch_storage_scheme(), solvers.fv.FV.FV.unknowns(), and solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns().

Here is the caller graph for this function:

◆ create_data_structures()

◆ create_readme_descriptor()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.create_readme_descriptor ( self,
domain_offset,
domain_size )

◆ get_name_of_global_instance()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.get_name_of_global_instance ( self)

Definition at line 230 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References api.solvers.Solver.Solver._name, api.Tree.Tree._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.aderdg.ADERDG.ADERDG._name, solvers.api.Solver.Solver._name, solvers.elliptic.AMRMarker.AMRMarker._name, _name, and tarch::services::ServiceRepository::ServiceEntry._name.

Referenced by solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._load_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_cell_data_default_guard(), solvers.fv.FV.FV._load_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_face_data_default_guard(), solvers.fv.FV.FV._provide_cell_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_face_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_face_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._store_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_cell_data_default_guard(), solvers.fv.FV.FV._store_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_face_data_default_guard(), solvers.rkdg.SeparateSweeps.SeparateSweeps.create_action_sets(), and solvers.fv.SingleSweep.SingleSweep.create_data_structures().

Here is the caller graph for this function:

◆ name()

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.name ( self)

Definition at line 393 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References api.solvers.Solver.Solver._name, api.Tree.Tree._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, peano4.api.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.api.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.api.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, peano4::RunMultipleSteps._name, solvers.aderdg.ADERDG.ADERDG._name, solvers.api.Solver.Solver._name, solvers.elliptic.AMRMarker.AMRMarker._name, _name, and tarch::services::ServiceRepository::ServiceEntry._name.

◆ postprocess_updated_cell() [1/2]

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.postprocess_updated_cell ( self)

◆ postprocess_updated_cell() [2/2]

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.postprocess_updated_cell ( self,
kernel )

Define a postprocessing routine over the data.

Typically, you do something similar to

 if ( not repositories::{{SOLVER_INSTANCE}}.patchCanUseStatelessPDETerms(marker.x(), marker.h(), timeStamp, timeStepSize) ) {
   fineGridCell{{CELL_NAME}}.setValue(1.0);
 }

We evaluate some criterion (here, we only look at a global function, but we also have access to all the other solver data in the kernel) and then set the cell value to the maximum if the criterion holds.

Attributes

kernel: String C++ code that holds the postprocessing kernel

Definition at line 403 of file ConstrainedPoissonEquationForMarkerOnCells.py.

References _postprocess_updated_cell, solvers.aderdg.ADERDG.ADERDG.create_action_sets(), solvers.aderdg.SingleSweep.SingleSweep.create_action_sets(), solvers.elliptic.AMRMarker.AMRMarker.create_action_sets(), create_action_sets(), exahype2.api.AuxiliaryVariables.AuxiliaryVariables.create_data_structures(), solvers.aderdg.ADERDG.ADERDG.create_data_structures(), solvers.aderdg.SingleSweep.SingleSweep.create_data_structures(), solvers.elliptic.AMRMarker.AMRMarker.create_data_structures(), and create_data_structures().

Here is the call graph for this function:

Field Documentation

◆ __repr__

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.__repr__ = __str__
staticprivate

◆ _action_set_smoother

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._action_set_smoother
protected
Initial value:
cell_data = self._cell_data_model,
face_data = self._face_data_model,
relaxation_coefficient = self._relaxation_coefficient,
rhs_expr = self._right_hand_side,
unknown_setter = "setValue",
unknown_getter = "getValue",
guard = "repositories::isLastGridSweepOfTimeStep() and not fineGridCellAlphaPoissonMarker.getInvariant()"
)

Definition at line 200 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Referenced by add_actions_to_create_grid(), add_actions_to_init_grid(), add_actions_to_perform_time_step(), and add_actions_to_plot_solution().

◆ _cell_data_model

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._cell_data_model = peano4.api.datamodel.DaStGen2( self._unknown_identifier() )
protected

◆ _face_data_model

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._face_data_model = peano4.api.toolbox.multigrid.cellbased.ScalarJacobiWithRediscretisation.construct_face_helper_data(self._cell_data_model)
protected

◆ _max_threshold

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._max_threshold = max_threshold
protected

◆ _max_value

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._max_value = max_value
protected

◆ _min_threshold

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._min_threshold = min_threshold
protected

◆ _min_value

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._min_value = min_value
protected

◆ _name

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name = name
protected

Definition at line 117 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Referenced by __str__(), solvers.fv.FV.FV.__str__(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.__str__(), solvers.fv.EnclaveTasking.EnclaveTasking._enclave_task_name(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._load_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_cell_data_default_guard(), solvers.fv.FV.FV._load_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_face_data_default_guard(), solvers.fv.FV.FV._provide_cell_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_face_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_face_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._store_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_cell_data_default_guard(), solvers.fv.FV.FV._store_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_face_data_default_guard(), _unknown_identifier(), solvers.fv.FV.FV._unknown_identifier(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._unknown_identifier(), solvers.fv.FV.FV.add_actions_to_checkpoint_solution(), solvers.fv.EnclaveTasking.EnclaveTasking.add_actions_to_create_grid(), solvers.fv.EnclaveTasking.EnclaveTasking.add_actions_to_init_grid(), add_actions_to_plot_solution(), solvers.fv.FV.FV.add_actions_to_plot_solution(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_actions_to_plot_solution(), solvers.fv.EnclaveTasking.EnclaveTasking.add_entries_to_text_replacement_dictionary(), solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking.add_entries_to_text_replacement_dictionary(), add_to_Peano4_datamodel(), solvers.fv.rusanov.LocalTimeStepWithEnclaveTasking.LocalTimeStepWithEnclaveTasking.create_action_sets(), solvers.fv.rusanov.SubcyclingAdaptiveTimeStepWithEnclaveTasking.SubcyclingAdaptiveTimeStepWithEnclaveTasking.create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStep.SubcyclingFixedTimeStep.create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStepWithEnclaveTasking.SubcyclingFixedTimeStepWithEnclaveTasking.create_action_sets(), solvers.rkdg.SeparateSweeps.SeparateSweeps.create_action_sets(), solvers.fv.SingleSweep.SingleSweep.create_data_structures(), get_name_of_global_instance(), solvers.fv.FV.FV.get_name_of_global_instance(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.get_name_of_global_instance(), name(), and solvers.fv.FV.FV.name().

◆ _plot

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._plot = plot
protected

◆ _postprocess_updated_cell

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._postprocess_updated_cell = None
protected

◆ _relaxation_coefficient

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._relaxation_coefficient = relaxation_coefficient
protected

Definition at line 118 of file ConstrainedPoissonEquationForMarkerOnCells.py.

Referenced by __str__().

◆ _right_hand_side

solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._right_hand_side = right_hand_side
protected

The documentation for this class was generated from the following file: