|
Peano
|
Simple solver which maps the DG steps onto separate mesh traversals. More...


Public Member Functions | |
| __init__ (self, name, dimensions, poly_degree, unknowns_per_cell_node, solutions_per_face_node, projections_per_face_node, min_h, max_h, assembly_matrix, assembly_matrix_scaling, mass_matrix, mass_matrix_scaling, face_from_cell_projection, face_from_cell_projection_scaling, cell_from_face_projection, cell_from_face_projection_scaling, riemann_matrix, boundary_matrix, cell_relaxation, face_relaxation, approximate_system_matrix, approximate_system_matrix_scaling, integration_points, solver_tolerance, custom_init_actionset=None, custom_plot_actionset=None, custom_init_cell="", enable_plotting=True, plot_predicate="true", solver_includes="", use_smart_pointer=True) | |
| Construct the solver. | |
Public Member Functions inherited from solvers.api.Solver.Solver | |
| add_to_Peano4_datamodel (self, datamodel, verbose) | |
| add_use_statements (self, observer) | |
| This routine should still be called even if overwritten in child class. | |
| typename (self) | |
| instance_name (self) | |
| Return the name of the object that will be created for this solver. | |
| create_readme_descriptor (self) | |
| add_to_abstract_solver (self, header, implementation) | |
| add_to_vertex_data (self, name, size) | |
| Add in extra attributes on the fly. | |
| add_to_cell_data (self, name, size) | |
| Add in extra attributes on the fly. | |
| add_to_face_data (self, name, size) | |
| Add in extra attributes on the fly. | |
| name (self) | |
| __str__ (self) | |
Simple solver which maps the DG steps onto separate mesh traversals.
This Python class is a mere wrapper without any funtionality. The interesting stuff happens in the template file that is used for this variant, i.e. DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.Abstract.template.h and DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.Abstract.template.cpp. These files introduce a marker toggling mechnanism, where a marker always runs through the three steps
and hence ensures that we actually traverse the mesh three times before we actually have a new solution.
Definition at line 21 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.py.
| solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.__init__ | ( | self, | |
| name, | |||
| dimensions, | |||
| poly_degree, | |||
| unknowns_per_cell_node, | |||
| solutions_per_face_node, | |||
| projections_per_face_node, | |||
| min_h, | |||
| max_h, | |||
| assembly_matrix, | |||
| assembly_matrix_scaling, | |||
| mass_matrix, | |||
| mass_matrix_scaling, | |||
| face_from_cell_projection, | |||
| face_from_cell_projection_scaling, | |||
| cell_from_face_projection, | |||
| cell_from_face_projection_scaling, | |||
| riemann_matrix, | |||
| boundary_matrix, | |||
| cell_relaxation, | |||
| face_relaxation, | |||
| approximate_system_matrix, | |||
| approximate_system_matrix_scaling, | |||
| integration_points, | |||
| solver_tolerance, | |||
custom_init_actionset = None, |
|||
custom_plot_actionset = None, |
|||
custom_init_cell = "", |
|||
enable_plotting = True, |
|||
plot_predicate = "true", |
|||
solver_includes = "", |
|||
use_smart_pointer = True |
|||
| ) |
Construct the solver.
Please consult the tutorial on data masking for a discussion of the load_store_compute_flag settings.
| poly_degree | Integer The degree of the polynomial that we use. Has to be bigger or equal to one. |
| unknowns_per_cell_node | Positive Integer This is the \( K^c \) from the solver description. |
| solutions_per_face_node | Positive Integer This is the \( K^f \) from the solver description. |
| projections_per_face_node | Positive Integer This is the \( K^f_{f \gets c} \) from the solver description. |
| cell_relaxation | Float This is the \( \omega _c \) from the description above and typically chosen form \( ]0,1[ \) though some scenarios benefit from a slight overrelaxation. |
| assembly_matrix | \( \mathbb{R}^{K^c * (p+1)^{d} \times K^c * (p+1)^{d}}\) This is the cell-to-cell matrix which defines how the cell nodes couple to one another. Is is a square matrix. You can pass in None. In this case, the generated C++ code will not compile, but you will be allowed to fill it in manually. |
| assembly_matrix_scaling | \( \mathbb{R}^{K^c * (p+1)^{d} \times K^c * (p+1)^{d}}\) This is a matrix of ints that prescribes how we scale each element in the assembly_matrix ie for each i,j, we do: assembly_matrix[i,j] *= ( h )^( assembly_matrix_scaling[i,j] ) |
| mass_matrix | \( \mathbb{R}^{K^c * (p+1)^{d} \times K^c * (p+1)^{d}}\) |
| mass_matrix_scaling | \( \mathbb{R}^{K^c * (p+1)^{d} \times K^c * (p+1)^{d}}\) This is a matrix of ints that prescribes how we scale each element in the mass_matrix ie for each i,j, we do: mass_matrix[i,j] *= ( h )^( mass_matrix_scaling[i,j] ) |
| face_from_cell | \( \mathbb{R}^{2d * 2K^f_{f \gets c} * (p+1)^{d-1} \times K^c * (p+1)^{d}}\) This matrix projects the cell solution onto all of the faces. Note the extra factor of \( 2d \). The structure of this matrix is quite important. The rows should be structured in blocks of \( 2K^f_{f \gets c} * (p+1)^{d-1} \), ie one for each face, in the familiar Peano ordering. We note that this is the same as the number of projections we store per face. We note that, since the 0th face has left-side projections which should be set outside of the cell, that at least half of the rows of the matrix should be empty. We also note that each face contains multiple nodes, and they should be ordered sequentially in the typical Peano fashion, i.e. greedily along each coordinate axis until full, starting from the negative. For each face, with two nodes, with two values (q and u) being projected onto the face, the rows should be ordered as follows:
|
| cell_from_face | \( \mathbb{R}^{K^c * (p+1)^{d} \times 2d K^f * (p+1)^{d-1}}\) This matrix projects the face solution onto the cells. Note the extra factor of \( 2d \), similar to face_from_cell matrix. Some clever indexing is required in the backend here. The enumeration of the cols should follow a similar pattern to the rows of face_from_cell. |
| cell_from_face_scaling | \( \mathbb{R}^{K^c * (p+1)^{d} \times 2d K^f * (p+1)^{d-1}}\) This is a matrix of ints that prescribes how we scale each element in the cell_from_face ie for each i,j, we do: cell_from_face[i,j] *= ( h )^( cell_from_face_scaling[i,j] ) |
| Riemann_matrix | \( \mathbb{R}^{ K^f (p+1)^{d-1} \times 2K^f_{f \gets c} (p+1)^{d-1}} \) The matrix that combines the left/right projections on the cell and outputs a value which determines \( q \). |
| face_relaxation | Float This is the \( \omega _f \) from above. Chosen from \( ]0,1[ \). |
| approximate_system_matrix | \( \mathbb{R}^{K^c (p+1)^d \times K^c (p+1)^d} \) Approximation \( \tilde{A} \) which will be internally inverted, so it has to be non-singular. |
| approximate_system_matrix_scaling | \( \mathbb{R}^{K^c (p+1)^d \times K^c (p+1)^d} \) |
| integration_points | [Float] Sequence of polynomial_degree+1 entries which identify the position of the integration points along the unit interval. |
Reimplemented from solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.
Definition at line 42 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.py.

