Peano
Loading...
Searching...
No Matches
exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis Class Reference

The Gauss-Legendre Basis is by construction the only basis which yields diagonal mass matrices. More...

Inheritance diagram for exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis:
Collaboration diagram for exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis:

Public Member Functions

 __init__ (self, polynomial_order)
 
 quadrature_points (self)
 It seems to be a little bit weird that I have to use the polynomial order plus one here, but you have to read the docu to understand that we are evaluating the polynomial of a certain order to get the roots.
 
 quadrature_weights (self)
 It seems to be a little bit weird that I have to use the polynomial order plus one here, but you have to read the docu to understand that we are evaluating the polynomial of a certain order to get the roots.
 
- Public Member Functions inherited from exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix
 __str__ (self)
 
 init_dictionary_with_default_parameters (self, dictionary, use_multidimensional_arrays)
 To be implemented by subclass.
 
 value1d (self, x, number)
 Return the numberth shape function's value at x.
 
 derivative1d (self, x, number)
 Return the numberth shape function's derivative at x.
 
- Public Member Functions inherited from exahype2.solvers.LagrangeBasis.LagrangeBasis
 order (self)
 
 dofs_per_axis (self)
 

Additional Inherited Members

- Data Fields inherited from exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix
 dofs_per_axis
 
- Static Public Attributes inherited from exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix
str QuadraturePoints1dDocumentation
 
str QuadratureWeights1dDocumentation
 
str MassMatrix1dDocumentation
 
str StiffnessOperator1dDocumentation
 
str BasisFunctionValuesLeft1dDocumentation
 
str DerivativeOperator1dDocumentation
 
str InterpolationMatrix1dDocumentation
 
str RestrictionMatrix1dDocumentation
 
- Protected Attributes inherited from exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix
 _polynomial_order
 
- Protected Attributes inherited from exahype2.solvers.LagrangeBasis.LagrangeBasis
 _polynomial_order
 
 _render_digits
 

Detailed Description

The Gauss-Legendre Basis is by construction the only basis which yields diagonal mass matrices.

I rely solely on SciPy here to construct these functions, as I'm interested in numerical values only, and as the normal SciPy accuracy is sufficient.

There might be more elegant implementations using SymPy which exploit the special structure behind Gauss-Legendre. But I prefer here to stick to one Python package only.

Definition at line 609 of file LagrangeBasisWithDiagonalMassMatrix.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis.__init__ ( self,
polynomial_order )

Member Function Documentation

◆ quadrature_points()

exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis.quadrature_points ( self)

It seems to be a little bit weird that I have to use the polynomial order plus one here, but you have to read the docu to understand that we are evaluating the polynomial of a certain order to get the roots.

So the argument has to be equal to the number of quadrature points that I wannt have.

I originally used the roots_legendre and then did recalibrate the result manually. Today, SciPy directly offers a shifted Legendre function which I can use directly. So I don't need an expression like

return [ x/2.0+0.5 for x in roots_on_minus_one_one_interval ]

anymore. The nicest definition of the shifted Legendre shape functions can, as so often, be found on Wikipedia:

https://en.wikipedia.org/wiki/Legendre_polynomials#Shifted_Legendre_polynomials

Reimplemented from exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.

Definition at line 628 of file LagrangeBasisWithDiagonalMassMatrix.py.

References exahype2.solvers.LagrangeBasis.LagrangeBasis._polynomial_order, and exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix._polynomial_order.

Referenced by exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.__compute_derivative_operator(), exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.__compute_restriction_matrix(), exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.derivative1d(), exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.init_dictionary_with_default_parameters(), and exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.value1d().

Here is the caller graph for this function:

◆ quadrature_weights()

exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis.quadrature_weights ( self)

It seems to be a little bit weird that I have to use the polynomial order plus one here, but you have to read the docu to understand that we are evaluating the polynomial of a certain order to get the roots.

So the argument has to be equal to the number of quadrature points that I wannt have.

I originally used the roots_legendre and then did recalibrate the result manually. Today, SciPy directly offers a shifted Legendre function which I can use directly. So I don't need an expression like

return [ x/2.0+0.5 for x in roots_on_minus_one_one_interval ]

anymore. The nicest definition of the shifted Legendre shape functions can, as so often, be found on Wikipedia:

https://en.wikipedia.org/wiki/Legendre_polynomials#Shifted_Legendre_polynomials

Reimplemented from exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.

Definition at line 656 of file LagrangeBasisWithDiagonalMassMatrix.py.

References exahype2.solvers.LagrangeBasis.LagrangeBasis._polynomial_order, and exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix._polynomial_order.

Referenced by exahype2.solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.init_dictionary_with_default_parameters().

Here is the caller graph for this function:

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