hummingbird
Solving the self-adjoint angular flux transport equation using spectral elements on Cartesian geometry
Loading...
Searching...
No Matches
hummingbird::GaussLegendre Class Reference

Defines a Gauss-Legendre quadrature set on the interval [-1,1]. More...

#include <gauss_legendre.h>

Inheritance diagram for hummingbird::GaussLegendre:
[legend]
Collaboration diagram for hummingbird::GaussLegendre:
[legend]

Public Member Functions

 GaussLegendre (const unsigned int n_points)
 Construct a new GaussLegendre object.
Public Member Functions inherited from hummingbird::QuadratureBase< double >
 QuadratureBase ()=default
double GetWeight (const unsigned int abscissa_index) const
 Get the weight value corresponding to a given abscissa value.
double GetAbscissa (const unsigned int index) const
 Get the abscissa corresponding to the index.
double Integrate (const std::vector< QuadraturePair > &quad_pairs) const
 Integrate the function using the function value and its location on the quadrature grid.
const std::vector< double > & abscissas () const
 Getter for the abscissas in the quadrature set.
size_t n_points () const
 Get total number of abscissas.

Private Member Functions

double ComputeWeight (const size_t k, const size_t n) override
 Compute the weight for abscissa value k for a n-th order Gauss-Legendre polynomial.

Additional Inherited Members

Protected Member Functions inherited from hummingbird::QuadratureBase< double >
void CreateWeightMap ()
 Create the weight map.
Protected Attributes inherited from hummingbird::QuadratureBase< double >
std::vector< double > abscissas_
 Abscissa values.
std::map< unsigned int, double > weight_map_
 Map to store the weights of the quadrature set where the keys are the indices corresponding to abscissa values.

Detailed Description

Defines a Gauss-Legendre quadrature set on the interval [-1,1].

Definition at line 14 of file gauss_legendre.h.

Constructor & Destructor Documentation

◆ GaussLegendre()

hummingbird::GaussLegendre::GaussLegendre ( const unsigned int n_points)

Construct a new GaussLegendre object.

Parameters
n_pointsNumber of quadrature points to be created

Definition at line 6 of file gauss_legendre.cc.

Member Function Documentation

◆ ComputeWeight()

double hummingbird::GaussLegendre::ComputeWeight ( const size_t k,
const size_t n )
overrideprivatevirtual

Compute the weight for abscissa value k for a n-th order Gauss-Legendre polynomial.

Parameters
kAbscissa number
nOrder of Gauss-Legendre polynomial
Returns
Weight corresponding to the k-th abscissa values

Reimplemented from hummingbird::QuadratureBase< double >.

Definition at line 11 of file gauss_legendre.cc.


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