|
Peano
|
Simple matrix generator assuming that we use a Gauss Lobatto unknown layout. More...


Public Member Functions | |
| __init__ (self, dimensions, poly_degree, unknowns_per_cell_node, unknowns_per_face_node, use_unit_interval=False) | |
| get_nodal_points_1d (self) | |
| Get the nodal points in the interval [-1,1]. | |
| get_points1d (self) | |
| Get spacing of integration points over unit interval. | |
| get_weights1d (self) | |
| Overwrites the method in the base class. | |
| get_weights1d_legendre (self) | |
| get_points1d_legendre (self) | |
| get_points_unit_interval (self) | |
| eval_integral (self, functions, dim=-1, factor=1) | |
| get_cell_identity_matrix (self) | |
| Construct identity for this particular equation system. | |
| get_cell_mass_matrix (self) | |
| Create a cell-cell mass matrix. | |
| get_cell_system_matrix_for_laplacian (self) | |
| Create a cell-cell mass matrix for \( \nabla p \cdot \nabla v \). | |
| get_face_to_cell_matrix (self) | |
| Return the cel-to-face matrix A_p^qf. | |
| get_cell_to_face_matrix (self) | |
| Return the projection operator. | |
| get_averaging_riemann_solver (self) | |
| Simple averaging Riemann solver. | |
| get_face_face_riemann_problem_matrix (self) | |
| Averaging matrix. | |
Public Member Functions inherited from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator | |
| get_polynomial1d (self) | |
| Method to create a list of 1D polynomials. | |
| get_integration_points_over_unit_interval (self) | |
| Most schemes define the integration point over the interval [-1,1] whereas MGHyPE often needs it on the unit interval. | |
| get_points_for_dimension (self, dim=-1) | |
| We promote the 1D quadrature points in into the dimensions of our problem by taking cartesian product. | |
| get_weights_for_dimension (self, dim=-1) | |
| We promote the 1D quadrature weights in into the dimensions of our problem by taking cartesian product. | |
| convert_index_to_dim (self, index, dim=-1) | |
| This method helps with indexing. | |
| get_polynomial (self, index, dim=-1) | |
| Promote 1d polynomials to many dimensions by taking products. | |
| get_deriv (self, index, dimForDeriv, dim=-1) | |
| dimForDeriv is the singular dimension that we wanna take a polyderiv in | |
Simple matrix generator assuming that we use a Gauss Lobatto unknown layout.
If you use this class, you assuem that a cell hosts \( (p+1)^d \) nodes carrying Legendre polynomials. As you use a Gauss Lobatto layout, the "outer" nodes will end up on the cell faces. Each node can hold a fixed number of unknowns. If you multiply the number of nodes per cell with the corresponding number of unknowns, you get the degrees of freedom within a global assembly matrix which correspond to volumetric data.
Definition at line 14 of file GaussLobatto.py.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.__init__ | ( | self, | |
| dimensions, | |||
| poly_degree, | |||
| unknowns_per_cell_node, | |||
| unknowns_per_face_node, | |||
use_unit_interval = False |
|||
| ) |
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Reimplemented in mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.
Definition at line 27 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.__init__().
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.__init__().


| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.eval_integral | ( | self, | |
| functions, | |||
dim = -1, |
|||
factor = 1 |
|||
| ) |
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Definition at line 127 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.eval_integral(), and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.use_unit_interval.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.eval_integral().


| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_averaging_riemann_solver | ( | self | ) |
Simple averaging Riemann solver.
We know that this solver is extremely diffusive, but it makes sense to provide this one as a simple debugging mechanism. In line with our DG description, it is clear that the dimension of the result matrix is \( dof \times 2dof \) where dof is the number of degrees of freedom projected onto a face.
Please note that unknowns_per_face_node= \( 3 \cdot dof \) in the equation above.
Definition at line 261 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.face_nodes, and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.unknowns_per_face_node.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_identity_matrix | ( | self | ) |
Construct identity for this particular equation system.
Not that this is identity construction has to take the number of unknowns into account as well as the number of degrees of freedom hosted within a cell.
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Reimplemented in mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.
Definition at line 136 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.cell_nodes, and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.unknowns_per_cell_node.
Referenced by mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_mass_matrix().

| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_mass_matrix | ( | self | ) |
Create a cell-cell mass matrix.
This matrix does not couple the individual unknowns per degree of freedom. The resulting matrix has to be scaled by \( h^d \).
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Reimplemented in mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.
Definition at line 141 of file GaussLobatto.py.
References mghype.api.matrixgenerators.DLinear.DLinear.block_matrix, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.block_matrix, and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.block_matrix.
Referenced by mghype.api.matrixgenerators.DLinear.DLinear.get_lumped_mass_matrix(), and mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_lumped_mass_matrix().

| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_system_matrix_for_laplacian | ( | self | ) |
Create a cell-cell mass matrix for \( \nabla p \cdot \nabla v \).
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Reimplemented in mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.
Definition at line 153 of file GaussLobatto.py.
References mghype.api.matrixgenerators.DLinear.DLinear.block_matrix, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.block_matrix, and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.block_matrix.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_A_tilde().

| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_to_face_matrix | ( | self | ) |
Return the projection operator.
Definition at line 195 of file GaussLobatto.py.
References mghype.api.matrixgenerators.DLinear.DLinear.block_matrix, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.block_matrix, and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.block_matrix.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_face_face_riemann_problem_matrix | ( | self | ) |
Averaging matrix.
Implement separately for GaussLobattoMatrixFree class, taking into account solutions_per_face_node and projections_per_face_node. Now assume there are 2 "solutions" (i.e. f-variables: q^f and u^f) and two sets of projections: q^pm an.
Definition at line 279 of file GaussLobatto.py.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_face_to_cell_matrix | ( | self | ) |
Return the cel-to-face matrix A_p^qf.
Definition at line 159 of file GaussLobatto.py.
References mghype.api.matrixgenerators.DLinear.DLinear.block_matrix, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.block_matrix, and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.block_matrix.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_nodal_points_1d | ( | self | ) |
Get the nodal points in the interval [-1,1].
These are the nodes used for constructing the Lagrangian basis functions. Note, that they might be different from the quadrature points used for integration.
Definition at line 51 of file GaussLobatto.py.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points1d | ( | self | ) |
Get spacing of integration points over unit interval.
Overwriting the method in base class. Let's produce Gauss-Lobatto points. Standard behaviour is Legendre points using built-in stuff from scipy.
We borrow the method from the wikipedia page.
This routine returns the points in the interval [-1,1]. If you have to rescale them, use get_points_unit_interval() instead.
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Definition at line 59 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.poly_degree, and mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.poly_degree.
Referenced by mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_integration_points_over_unit_interval(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points1d_legendre(), and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d().

| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points1d_legendre | ( | self | ) |
Definition at line 119 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points1d().

| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points_unit_interval | ( | self | ) |
Definition at line 123 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.points1d, and mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.points1d.
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d | ( | self | ) |
Overwrites the method in the base class.
Method is borrowed from wikipedia
Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.
Definition at line 94 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points1d(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_points1d(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.poly_degree, and mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.poly_degree.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d_legendre().


| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d_legendre | ( | self | ) |
Definition at line 116 of file GaussLobatto.py.
References mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d().

| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.block_matrix |
Definition at line 49 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_cell_from_face_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_mass_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_mass_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_to_face_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_face_to_cell_matrix(), and mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_projection_matrices().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.cell_nodes |
Definition at line 40 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_identity_matrix().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.dimensions |
Definition at line 286 of file GaussLobatto.py.
Referenced by tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_meta_data_region(), tarch.plotter.api.input.PatchFileParser.PatchFileParser.__parse_patch_region(), tarch.plotter.api.input.PatchFileParser.PatchFileParser.__record_doubles_per_patch(), tarch.plotter.api.input.PatchFileParser.UnknownAttributes._initialise_default_mapping_if_no_mapping_specified(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.convert_index_to_dim(), equations.euler.Euler.eigenvalues(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.eval_integral(), equations.elastic.Elastic.flux(), equations.euler.Euler.flux(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_boundary_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_cell_from_face_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_identity_matrix(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_identity_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_mass_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_deriv(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_points_for_dimension(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_polynomial(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_projection_matrices(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_weights_for_dimension(), matrices.DgGenerator.getCellToFaceMatrix(), api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation.nodes_per_cell(), api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation.nodes_per_face(), and tarch.plotter.api.input.PatchFileParser.PatchFileParser.parse_file().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.face_nodes |
Definition at line 41 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_averaging_riemann_solver().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.points1d |
Definition at line 46 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_points_for_dimension(), and mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points_unit_interval().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.poly_degree |
Definition at line 57 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.convert_index_to_dim(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_boundary_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_cell_from_face_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points1d(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_points1d(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_polynomial1d(), mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_projection_matrices(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d(), and mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_weights1d().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.unknowns_per_cell_node |
Definition at line 37 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_cell_from_face_matrix(), mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_identity_matrix(), and mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_projection_matrices().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.unknowns_per_face_node |
Definition at line 38 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_averaging_riemann_solver().
| mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.use_unit_interval |
Definition at line 43 of file GaussLobatto.py.
Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.eval_integral().