Peano
Loading...
Searching...
No Matches
mghype.api.matrixgenerators.GaussLobatto.GaussLobatto Class Reference

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

Inheritance diagram for mghype.api.matrixgenerators.GaussLobatto.GaussLobatto:
Collaboration diagram for mghype.api.matrixgenerators.GaussLobatto.GaussLobatto:

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
 

Data Fields

 unknowns_per_cell_node
 
 unknowns_per_face_node
 
 cell_nodes
 
 face_nodes
 
 use_unit_interval
 
 points1d
 
 block_matrix
 
 poly_degree
 
 dimensions
 
- Data Fields inherited from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator
 dimensions
 
 poly_degree
 
 unknowns_per_node
 
 polynomials1d
 
 derivatives1d
 
 points1d
 
 weights1d
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

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__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ eval_integral()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.eval_integral (   self,
  functions,
  dim = -1,
  factor = 1 
)

◆ get_averaging_riemann_solver()

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.

◆ get_cell_identity_matrix()

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().

Here is the caller graph for this function:

◆ get_cell_mass_matrix()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_mass_matrix (   self)

◆ get_cell_system_matrix_for_laplacian()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_system_matrix_for_laplacian (   self)

◆ get_cell_to_face_matrix()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_cell_to_face_matrix (   self)

◆ get_face_face_riemann_problem_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.

◆ get_face_to_cell_matrix()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_face_to_cell_matrix (   self)

◆ get_nodal_points_1d()

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.

◆ get_points1d()

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().

Here is the caller graph for this function:

◆ get_points1d_legendre()

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().

Here is the call graph for this function:

◆ get_points_unit_interval()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_points_unit_interval (   self)

◆ get_weights1d()

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.get_weights1d (   self)

◆ 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().

Here is the call graph for this function:

Field Documentation

◆ block_matrix

◆ cell_nodes

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.cell_nodes

◆ dimensions

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().

◆ face_nodes

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.face_nodes

◆ points1d

◆ poly_degree

◆ unknowns_per_cell_node

◆ unknowns_per_face_node

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.unknowns_per_face_node

◆ use_unit_interval

mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.use_unit_interval

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