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

Simple matrix generator for continuous d-linear finite elements. More...

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

Public Member Functions

 __init__ (self, dimensions, unknowns_per_node)
 get_cell_identity_matrix (self)
 Return identity matrix and a 0 as the identity matrix has no intrinsic scaling, i.e.
 get_lumped_mass_matrix (self)
 Get this working for 2d.
 get_cell_mass_matrix (self)
 Create a cell-cell mass matrix.
 get_cell_system_matrix_for_laplacian (self)
 Create a cell-cell mass matrix.
Public Member Functions inherited from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator
 __init__ (self, dimensions, poly_degree, unknowns_per_node=1)
 get_polynomial1d (self)
 Method to create a list of 1D polynomials.
 get_points1d (self)
 Method to set the quadrature points, used for integration.
 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_weights1d (self)
 Method to set the quadrature weights, used for integration.
 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
 eval_integral (self, functions, dim=-1, factor=1)

Data Fields

 block_matrix = mghype.api.matrixgenerators.blockmatrix.DGPoisson2dPenaltyBlockMatrix(self.poly_degree)
Data Fields inherited from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator
 dimensions = dimensions
 poly_degree = poly_degree
 unknowns_per_node = unknowns_per_node
 polynomials1d = self.get_polynomial1d()
list derivatives1d = [ p.deriv() for p in self.polynomials1d ]
 points1d = self.get_points1d()
 weights1d = self.get_weights1d()

Protected Member Functions

 _cell_dofs (self)

Detailed Description

Simple matrix generator for continuous d-linear finite elements.

This factory method is there for convenience, i.e. users can take it to pre-assemble local matrices and then to pipe it into the Peano 4 multigrid classes. Most of the stuff in here in hard-coded, so only well-suited for relatively primitive solvers. You might want to specialise these routines, switch to a more sophisticated matrix generator, or abandon the idea of a matrix generator altogether.

Definition at line 10 of file DLinear.py.

Constructor & Destructor Documentation

◆ __init__()

mghype.api.matrixgenerators.DLinear.DLinear.__init__ ( self,
dimensions,
unknowns_per_node )

Definition at line 23 of file DLinear.py.

References __init__().

Referenced by __init__().

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

Member Function Documentation

◆ _cell_dofs()

mghype.api.matrixgenerators.DLinear.DLinear._cell_dofs ( self)
protected

Definition at line 38 of file DLinear.py.

Referenced by get_cell_identity_matrix(), and mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_identity_matrix().

Here is the caller graph for this function:

◆ get_cell_identity_matrix()

mghype.api.matrixgenerators.DLinear.DLinear.get_cell_identity_matrix ( self)

Return identity matrix and a 0 as the identity matrix has no intrinsic scaling, i.e.

its scaling is \( h^0 \).

Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.

Definition at line 45 of file DLinear.py.

References _cell_dofs(), convert::data::PatchData.dimensions, convert::data::Variable.dimensions, exahype2.api.dslhype2.Types.TVector.dimensions, and dimensions.

Referenced by mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_mass_matrix().

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

◆ get_cell_mass_matrix()

mghype.api.matrixgenerators.DLinear.DLinear.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 \).

Use the mass matrix generated for DG Interior Penalty for Poisson equation.

Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.

Definition at line 76 of file DLinear.py.

References block_matrix, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, exahype2.api.dslhype2.Types.TVector.dimensions, and dimensions.

Referenced by get_lumped_mass_matrix(), and mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_lumped_mass_matrix().

Here is the caller graph for this function:

◆ get_cell_system_matrix_for_laplacian()

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

Create a cell-cell mass matrix.

In a finite element context, this matrix has to be scaled with \( h^{d-2} \). Therefore, we retturn d-2 as second argument.

Use the cell-cell matrix generated for DG Interior Penalty for Poisson equation.

Reimplemented from mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.

Definition at line 91 of file DLinear.py.

References block_matrix, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, exahype2.api.dslhype2.Types.TVector.dimensions, and dimensions.

Referenced by mghype.api.matrixgenerators.GaussLobatto.GaussLobattoMatrixFree.get_A_tilde().

Here is the caller graph for this function:

◆ get_lumped_mass_matrix()

mghype.api.matrixgenerators.DLinear.DLinear.get_lumped_mass_matrix ( self)

Get this working for 2d.

What about 3d? If we select an index for the first dimension and then sum over the other two (ie call np.sum( massMatrix[i,] )) it will just add up all elements along the 2 other dimensions, as if we flattened it. Is this what we want?

Definition at line 58 of file DLinear.py.

References get_cell_mass_matrix().

Here is the call graph for this function:

Field Documentation

◆ block_matrix


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