|
Peano
|
This is one of the simplest solvers that you can think of. More...


Public Member Functions | |
| __init__ (self, name, unknowns, dimensions, min_h, max_h, cell_lhs_matrix, cell_rhs_matrix, cell_lhs_matrix_scaling, cell_rhs_matrix_scaling) | |
| Collocated low-order (d-linear) Finite Elements. | |
| add_to_Peano4_datamodel (self, datamodel, verbose) | |
| Initialise index model. | |
| add_use_statements (self, observer) | |
| Register the index numbers to be used in each and every mesh traversal. | |
| add_to_plot (self, observer) | |
| Tell the project's observer how to plot the data. | |
| add_to_create_grid (self, observer) | |
| Add whatever action set you want to use to observer. | |
| add_to_enumerate_and_init_solution (self, observer) | |
| Solution initialisation. | |
| add_to_assemble (self, observer) | |
| Add whatever action set you want to use to observer. | |
| add_to_init_petsc (self, observer) | |
| Add whatever action set you want to use here. | |
| add_to_map_solution_onto_mesh (self, observer) | |
| Add whatever action set you want to use to observer. | |
| add_implementation_files_to_project (self, namespace, output, subdirectory="") | |
| The solver creates two classes: An abstract base class and its implementations. | |
| number_of_matrix_entries_per_vertex (self) | |
| Nothing is associated with the vertex. | |
| number_of_matrix_entries_per_face (self) | |
| In the DG scheme, we have a projection from the left and we have a projection from the right. | |
| number_of_matrix_entries_per_cell (self) | |
| This is the actual unknowns per cell. | |
Public Member Functions inherited from api.solvers.Solver.Solver | |
| typename (self) | |
| instance_name (self) | |
| Return the name of the object that will be created for this solver. | |
| create_readme_descriptor (self) | |
| Should really be abstract and properly be initialised. | |
| name (self) | |
Data Fields | |
| cell_lhs_matrix | |
| cell_rhs_matrix | |
| cell_lhs_matrix_scaling | |
| cell_rhs_matrix_scaling | |
| max_h | |
| min_h | |
| number_of_matrix_entries_per_vertex | |
Data Fields inherited from api.solvers.Solver.Solver | |
| min_h | |
| max_h | |
Protected Attributes | |
| _unknowns | |
| _vertex_pde_data | |
Protected Attributes inherited from api.solvers.Solver.Solver | |
| _name | |
| _vertex_petsc_data | |
| _face_petsc_data | |
| _cell_petsc_data | |
This is one of the simplest solvers that you can think of.
It places one degree of freedom (can be scalar or a vector) on each vertex. As we support solely element-wise assembly, this means you can implement things like a 9-point (2d) or 27-point (3d) stencil, but not really anything more sophisticated.
cell_lhs_matrix: [double] or [] Pass in [] if you prefer to assemble the matrix per cell yourself.
cell_rhs_matrix: [double] or [] Pass in [] if you prefer to assemble the matrix per cell yourself.
cell_lhs_matrix_scaling: Positive integer The lhs matrix is scaled with \( h^x \) where the x is defined by this parameter. If you don't specify an lhs matrix, i.e. you prefer to inject this matrix manually, you can leave this parameter None, as it is not used.
cell_rhs_matrix_scaling: Positive integer The rhs matrix is scaled with \( h^x \) where the x is defined by this parameter. If you don't specify a rhs matrix, i.e. you prefer to inject this matrix manually, you can leave this parameter None, as it is not used.
Definition at line 219 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.__init__ | ( | self, | |
| name, | |||
| unknowns, | |||
| dimensions, | |||
| min_h, | |||
| max_h, | |||
| cell_lhs_matrix, | |||
| cell_rhs_matrix, | |||
| cell_lhs_matrix_scaling, | |||
| cell_rhs_matrix_scaling ) |
Collocated low-order (d-linear) Finite Elements.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 247 of file CollocatedLowOrderDiscretisation.py.
References api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.__init__().
Referenced by api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.__init__().


| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_implementation_files_to_project | ( | self, | |
| namespace, | |||
| output, | |||
| subdirectory = "" ) |
The solver creates two classes: An abstract base class and its implementations.
The abstract base class will be overwritten if there is one in the directory. I pipe all the Python constants into this base class, so they are available in the C++ code.
The implementation file will not be overwritten, as I assume that the users will write their own domain-specific stuff in there. If it does not exist yet, I'll create an empty stub which can be befilled with something meaningful.
Besides the creation of these two files, I also add the files to the project artifacts and the makefile, so they are captured by the build system.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 352 of file CollocatedLowOrderDiscretisation.py.
References peano4.output.ActionSet.ActionSet.__class__, peano4.output.Jinja2TemplatedHeaderImplementationFilePair.Jinja2TemplatedHeaderImplementationFilePair.__class__, peano4.output.Observer.Observer.__class__, peano4.output.TemplatedHeaderFile.TemplatedHeaderFile.__class__, and peano4.output.TemplatedHeaderImplementationFilePair.TemplatedHeaderImplementationFilePair.__class__.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_assemble | ( | self, | |
| observer ) |
Add whatever action set you want to use to observer.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 338 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_create_grid | ( | self, | |
| observer ) |
Add whatever action set you want to use to observer.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 319 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_enumerate_and_init_solution | ( | self, | |
| observer ) |
Solution initialisation.
Close to trivial: Just add the action set petsc.actionsets.InitVertexDoFs to the observer.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 324 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_init_petsc | ( | self, | |
| observer ) |
Add whatever action set you want to use here.
I am not sure if there is a real grid traversal tied to this step. So maybe nothing is called. Has to be checked. Anyway, most solvers leave this one blank.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 343 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_map_solution_onto_mesh | ( | self, | |
| observer ) |
Add whatever action set you want to use to observer.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 347 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_Peano4_datamodel | ( | self, | |
| datamodel, | |||
| verbose ) |
Initialise index model.
We build up a data model, which is really an index model in this case. Every vertex, face and cell can hold a data model which is only one integer. This integer encodes the first index of a matrix unknown held by the grid entity. For the plain DG code, there are no vertex unknowns. However, we have two types of face indices: Those for the projection and those for the solution of the Riemann problem.
You might want to overwrite this routine, but please ensure that you still call this superclass implementation, too.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 279 of file CollocatedLowOrderDiscretisation.py.
References api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation._vertex_pde_data, and api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_Peano4_datamodel().
Referenced by api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_Peano4_datamodel().


| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_plot | ( | self, | |
| observer ) |
Tell the project's observer how to plot the data.
Nothing fancy here. We add plotters from Peano's toolbox to visualise solution and right-hand side.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 289 of file CollocatedLowOrderDiscretisation.py.
References SBH.Limiter._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exahype2.kerneldsl.SyntaxTree.MemoryAllocation._name, exahype2.kerneldsl.SyntaxTree.MemoryDeallocation._name, exahype2.kerneldsl.SyntaxTree.Construction._name, exahype2.kerneldsl.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.kerneldsl.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.kerneldsl.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.kerneldsl.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.solvers.aderdg.ADERDG.ADERDG._name, exahype2.solvers.elliptic.AMRMarker.AMRMarker._name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name, exahype2.solvers.fv.EnclaveTasking.EnclaveTasking._name, exahype2.solvers.fv.FV.FV._name, exahype2.solvers.limiting.PosterioriLimiting.PosterioriLimiting._name, exahype2.solvers.limiting.StaticLimiting.StaticLimiting._name, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._name, exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._name, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep._name, exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, peano4.dastgen2.Peano4SmartPointerDoubleArray.Peano4SmartPointerDoubleArray._name, solvers.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, api.solvers.Solver.Solver._name, tarch::services::ServiceRepository::ServiceEntry._name, api.Tree.Tree._name, exahype2.solvers.aderdg.ADERDG.ADERDG._unknowns, exahype2.solvers.fv.FV.FV._unknowns, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._unknowns, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._unknowns, peano4.visualisation.output.Visualiser.PatchFileData._unknowns, exahype2::CellAccess._unknowns, exahype2::enumerator::AoSLexicographicEnumerator._unknowns, exahype2::enumerator::AoSoALexicographicEnumerator._unknowns, exahype2::enumerator::FaceAoSLexicographicEnumerator._unknowns, exahype2::enumerator::SingleDoFEnumerator._unknowns, exahype2::enumerator::SoALexicographicEnumerator._unknowns, api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation._unknowns, and api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation._vertex_pde_data.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_use_statements | ( | self, | |
| observer ) |
Register the index numbers to be used in each and every mesh traversal.
You can overwrite the routine and add your own stuff. However, please ensure this routine still is invoked, too.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 284 of file CollocatedLowOrderDiscretisation.py.
References api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation._vertex_pde_data, and api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_use_statements().
Referenced by api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_use_statements().


| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.number_of_matrix_entries_per_cell | ( | self | ) |
This is the actual unknowns per cell.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 438 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.number_of_matrix_entries_per_face | ( | self | ) |
In the DG scheme, we have a projection from the left and we have a projection from the right.
These values are proper projections, i.e. they do not carry any semantics. Then we have to solve the Riemann problem, and need one more unknown to store the outcome of that one.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 426 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.number_of_matrix_entries_per_vertex | ( | self | ) |
Nothing is associated with the vertex.
There's nothing to be done here.
Reimplemented from api.solvers.Solver.Solver.
Definition at line 417 of file CollocatedLowOrderDiscretisation.py.
References exahype2.solvers.aderdg.ADERDG.ADERDG._unknowns, exahype2.solvers.fv.FV.FV._unknowns, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._unknowns, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._unknowns, peano4.visualisation.output.Visualiser.PatchFileData._unknowns, exahype2::CellAccess._unknowns, exahype2::enumerator::AoSLexicographicEnumerator._unknowns, exahype2::enumerator::AoSoALexicographicEnumerator._unknowns, exahype2::enumerator::FaceAoSLexicographicEnumerator._unknowns, exahype2::enumerator::SingleDoFEnumerator._unknowns, exahype2::enumerator::SoALexicographicEnumerator._unknowns, and api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation._unknowns.
|
protected |
Definition at line 267 of file CollocatedLowOrderDiscretisation.py.
Referenced by exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.__str__(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.__str__(), exahype2.solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), exahype2.solvers.fv.FV.FV._init_dictionary_with_default_parameters(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._init_dictionary_with_default_parameters(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_plot(), peano4.visualisation.output.Visualiser.PatchFileData.apply_renderer_to_data(), peano4.visualisation.output.Visualiser.PatchFileData.copy_data_from_parser_object(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.number_of_matrix_entries_per_vertex(), exahype2.solvers.aderdg.ADERDG.ADERDG.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), and exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns().
|
protected |
Definition at line 268 of file CollocatedLowOrderDiscretisation.py.
Referenced by api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_Peano4_datamodel(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_plot(), and api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_use_statements().
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.cell_lhs_matrix |
Definition at line 272 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.cell_lhs_matrix_scaling |
Definition at line 274 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.cell_rhs_matrix |
Definition at line 273 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.cell_rhs_matrix_scaling |
Definition at line 275 of file CollocatedLowOrderDiscretisation.py.
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.max_h |
Definition at line 320 of file CollocatedLowOrderDiscretisation.py.
Referenced by solvers.api.Solver.Solver.__str__(), swift2.particle.Particle.Particle.readme_descriptor(), and peano4.visualisation.filters.ExtractMeshResolution.ExtractMeshResolution.render().
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.min_h |
Definition at line 378 of file CollocatedLowOrderDiscretisation.py.
Referenced by solvers.api.Solver.Solver.__str__(), swift2.particle.Particle.Particle.readme_descriptor(), and peano4.visualisation.filters.ExtractMeshResolution.ExtractMeshResolution.render().
| api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.number_of_matrix_entries_per_vertex |
Definition at line 382 of file CollocatedLowOrderDiscretisation.py.