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


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 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 solvers.LagrangeBasis.LagrangeBasis | |
| order (self) | |
| dofs_per_axis (self) | |
Additional Inherited Members | |
Data Fields inherited from solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix | |
| mass_matrix | |
| dofs_per_axis | |
Static Public Attributes inherited from solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix | |
| str | QuadraturePoints1dDocumentation |
| str | QuadratureWeights1dDocumentation |
| str | MassMatrix1dDocumentation |
| str | StiffnessOperator1dDocumentation |
| str | BasisFunctionValuesLeft1dDocumentation |
| str | DerivativeOperator1dDocumentation |
| str | InterpolationMatrix1dDocumentation |
| str | RestrictionMatrix1dDocumentation |
| stiffness_matrix = None | |
Protected Attributes inherited from solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix | |
| _polynomial_order | |
Protected Attributes inherited from solvers.LagrangeBasis.LagrangeBasis | |
| _polynomial_order | |
| _render_digits | |
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 615 of file LagrangeBasisWithDiagonalMassMatrix.py.
| solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis.__init__ | ( | self, | |
| polynomial_order | |||
| ) |
Reimplemented from solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.
Definition at line 629 of file LagrangeBasisWithDiagonalMassMatrix.py.
References solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis.__init__().
Referenced by solvers.LagrangeBasisWithDiagonalMassMatrix.GaussLegendreBasis.__init__().


| 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 solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.
Definition at line 634 of file LagrangeBasisWithDiagonalMassMatrix.py.
References solvers.LagrangeBasis.LagrangeBasis._polynomial_order, and solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix._polynomial_order.
Referenced by solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.__compute_derivative_operator(), solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.__compute_restriction_matrix(), solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.derivative1d(), solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.init_dictionary_with_default_parameters(), and solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.value1d().

| 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 solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.
Definition at line 662 of file LagrangeBasisWithDiagonalMassMatrix.py.
References solvers.LagrangeBasis.LagrangeBasis._polynomial_order, and solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix._polynomial_order.
Referenced by solvers.LagrangeBasisWithDiagonalMassMatrix.LagrangeBasisWithDiagonalMassMatrix.init_dictionary_with_default_parameters().
