AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::numerics::QuadratureRule Class Reference

Stores fixed views to arrays of 1D quadrature points and weights. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/core/numerics/quadrature.hpp>

Public Member Functions

AXOM_HOST_DEVICE axom::ArrayView< const double > nodes () const
 Accessor for the full array of quadrature nodes. More...
 
AXOM_HOST_DEVICE axom::ArrayView< const double > weights () const
 Accessor for the full array of quadrature weights. More...
 
AXOM_HOST_DEVICE double node (size_t idx) const
 Accessor for quadrature nodes. More...
 
AXOM_HOST_DEVICE double weight (size_t idx) const
 Accessor for quadrature weights. More...
 
AXOM_HOST_DEVICE int getNumPoints () const
 Accessor for the size of the quadrature rule. More...
 

Friends

QuadratureRule get_gauss_legendre (int, int)
 Computes or accesses a precomputed 1D quadrature rule of Gauss-Legendre points. More...
 

Detailed Description

Stores fixed views to arrays of 1D quadrature points and weights.

Member Function Documentation

◆ nodes()

AXOM_HOST_DEVICE axom::ArrayView<const double> axom::numerics::QuadratureRule::nodes ( ) const
inline

Accessor for the full array of quadrature nodes.

◆ weights()

AXOM_HOST_DEVICE axom::ArrayView<const double> axom::numerics::QuadratureRule::weights ( ) const
inline

Accessor for the full array of quadrature weights.

◆ node()

AXOM_HOST_DEVICE double axom::numerics::QuadratureRule::node ( size_t  idx) const
inline

Accessor for quadrature nodes.

◆ weight()

AXOM_HOST_DEVICE double axom::numerics::QuadratureRule::weight ( size_t  idx) const
inline

Accessor for quadrature weights.

◆ getNumPoints()

AXOM_HOST_DEVICE int axom::numerics::QuadratureRule::getNumPoints ( ) const
inline

Accessor for the size of the quadrature rule.

References axom::ArrayView< T, DIM, SPACE >::size().

Friends And Related Function Documentation

◆ get_gauss_legendre

QuadratureRule get_gauss_legendre ( int  ,
int   
)
friend

Computes or accesses a precomputed 1D quadrature rule of Gauss-Legendre points.

Parameters
[in]nptsThe number of points in the rule

A Gauss-Legendre rule with npts points can exactly integrate polynomials of order 2 * npts - 1

Note
If this method has already been called for a given order, it will reuse the same quadrature points without needing to recompute them
Returns
The QuadratureRule object which contains axom::ArrayView<double>'s of stored nodes and weights

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