hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Gauss_legendre Class Reference

Basis based on Gauss-Legendre quadrature. More...

#include <Gauss_legendre.hpp>

Inheritance diagram for hexed::Gauss_legendre:
hexed::Basis

Public Member Functions

 Gauss_legendre (int row_size_arg)
 see hexed::Basis::Basis.
 
double node (int i) const override
 the ith interpolation node (i.e. quadrature point). Should be in interval [0, 1].
 
Eigen::VectorXd node_weights () const override
 node_weights()(i) is the quadrature weight associated with node(i) Integrates in domain [0, 1].
 
Eigen::MatrixXd diff_mat () const override
 Differentiation matrix.
 
Eigen::MatrixXd boundary () const override
 boundary()(i, j) is the jth basis polynomial evaluated at i for i in {0, 1}.
 
Eigen::VectorXd orthogonal (int degree) const override
 orthogonal(degree)(i) is the degreeth-degree Legendre polynomial evaluated at node(i).
 
Eigen::MatrixXd filter () const override
 Matrix that applies a low-pass filter to the Legendre modes of a polynomial.
 
Eigen::MatrixXd prolong (int i_half) const override
 Matrix to prolong into polynomial space of one higher refinement level.
 
Eigen::MatrixXd restrict (int i_half) const override
 Restrict from refined space above to polynomial space spanned by this basis.
 
double min_eig_diffusion () const override
 nondimensional minimum eigenvalue of 1D diffusion operator
 
- Public Member Functions inherited from hexed::Basis
 Basis (int row_size_arg)
 
Mat nodes () const
 Get vector of nodes.
 
Mat< dyn, dyninterpolate (const Mat<> &sample) const
 Interpolate to arbitrary points.
 
double max_cfl () const
 maximum stable CFL number for 1D convection
 
double step_ratio () const
 ratio of time step for convection stage 2 to stage 1
 

Protected Member Functions

double min_eig_convection () const override
 nondimensional minimum real part of eigenvals of 1D convection operator
 
double quadratic_safety () const override
 

Additional Inherited Members

- Public Attributes inherited from hexed::Basis
const int row_size
 row size
 

Detailed Description

Basis based on Gauss-Legendre quadrature.

The nodes and node_weights of this basis are those of the Gauss-Legendre quadrature, which is exact for polynomials of degree 2*row_size - 1.

Member Function Documentation

◆ boundary()

Eigen::MatrixXd hexed::Gauss_legendre::boundary ( ) const
overridevirtual

boundary()(i, j) is the jth basis polynomial evaluated at i for i in {0, 1}.

Implements hexed::Basis.

◆ diff_mat()

Eigen::MatrixXd hexed::Gauss_legendre::diff_mat ( ) const
overridevirtual

Differentiation matrix.

diff_mat()(i, j) is the derivative of interpolating polynomial j evaluated at node(i).

Implements hexed::Basis.

◆ filter()

Eigen::MatrixXd hexed::Gauss_legendre::filter ( ) const
overridevirtual

Matrix that applies a low-pass filter to the Legendre modes of a polynomial.

Implements hexed::Basis.

◆ min_eig_convection()

double hexed::Gauss_legendre::min_eig_convection ( ) const
overrideprotectedvirtual

nondimensional minimum real part of eigenvals of 1D convection operator

Implements hexed::Basis.

◆ min_eig_diffusion()

double hexed::Gauss_legendre::min_eig_diffusion ( ) const
overridevirtual

nondimensional minimum eigenvalue of 1D diffusion operator

Implements hexed::Basis.

◆ node()

double hexed::Gauss_legendre::node ( int i) const
overridevirtual

the ith interpolation node (i.e. quadrature point). Should be in interval [0, 1].

Implements hexed::Basis.

◆ node_weights()

Eigen::VectorXd hexed::Gauss_legendre::node_weights ( ) const
overridevirtual

node_weights()(i) is the quadrature weight associated with node(i) Integrates in domain [0, 1].

Implements hexed::Basis.

◆ orthogonal()

Eigen::VectorXd hexed::Gauss_legendre::orthogonal ( int degree) const
overridevirtual

orthogonal(degree)(i) is the degreeth-degree Legendre polynomial evaluated at node(i).

Polynomial is scaled so that its norm is 1 with respect to the quadrature rule of the basis.

Implements hexed::Basis.

◆ prolong()

Eigen::MatrixXd hexed::Gauss_legendre::prolong ( int i_half) const
overridevirtual

Matrix to prolong into polynomial space of one higher refinement level.

prolong(i_half)(i, j) is the jth basis polynomial evaluated at the ith node in the refined space. If i_half is 0, refined space is interval [0, 0.5]. If i_half is 1, then [0.5, 1]. This is a basic, naive implementation. Derived classes may override for performance and/or precision.

Reimplemented from hexed::Basis.

◆ quadratic_safety()

double hexed::Gauss_legendre::quadratic_safety ( ) const
inlineoverrideprotectedvirtual

Implements hexed::Basis.

◆ restrict()

Eigen::MatrixXd hexed::Gauss_legendre::restrict ( int i_half) const
overridevirtual

Restrict from refined space above to polynomial space spanned by this basis.

restrict(i_half)(i, j) is the value at the ith standard node of the orthogonal projection of the jth polynomial in the refined space into the space of this basis.

Implements hexed::Basis.


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