Class documentation of Concepts

Loading...
Searching...
No Matches
concepts::QuadratureRule1dGaussLobatto Class Reference

#include <quadRule.hh>

Inheritance diagram for concepts::QuadratureRule1dGaussLobatto:
concepts::QuadratureRule1dDynamic concepts::QuadratureRule1d concepts::OutputOperator

Public Member Functions

 QuadratureRule1dGaussLobatto (uint n)
 
virtual uint n () const
 Returns the number of points.
 
virtual const Realabscissas () const
 Returns a pointer into the array of the abscissas.
 
virtual const Realweights () const
 Returns a pointer into the array of the weights.
 
virtual void printRule ()
 print weights and abscissas to stdout
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 

Protected Attributes

const Realabscissas_
 Abscissas.
 
const Realweights_
 Weights.
 

Detailed Description

Gauss Lobatto quadrature rule including both endpoints.

\[ \int_{-1}^1 f(x) \, dx \approx \sum_{i=0}^p w_i f(x_i) \]

is exact for $f \in P_{2p-1}$ and n = p+1 points. n must be greater or equal to 2.

The abscissas $x_i$ are the zeros of $(1-x^2) P_{p-1}^{(1,1)}(x)$ and the weights are $w_i = 2/(p(p+1) (P_p^{(0,0)}(x_i))^2)$.

The computations and the storage of the values are done by the class Quadrature with template parameter 0. The difference between this class and Quadrature is that it is in a class hierarchy of quadrature rules. This has advantages when dynamically switching quadrature rules is needed. On the other hand, this class returns the values via a virtual function call abscissas() and weights() should therefore not be called to often (inside loops etc.).

See also
Quadrature
Author
Philipp Frauenfelder, 2004

Definition at line 94 of file quadRule.hh.

Constructor & Destructor Documentation

◆ QuadratureRule1dGaussLobatto()

concepts::QuadratureRule1dGaussLobatto::QuadratureRule1dGaussLobatto ( uint  n)
inline

Constructor. Computes the quadrature points.

Parameters
nNumber of points to be computed

Definition at line 100 of file quadRule.hh.

Member Function Documentation

◆ abscissas()

virtual const Real * concepts::QuadratureRule1dDynamic::abscissas ( ) const
inlinevirtualinherited

Returns a pointer into the array of the abscissas.

Implements concepts::QuadratureRule1d.

Reimplemented in concepts::QuadratureRule1dTrapeze.

Definition at line 62 of file quadRule.hh.

◆ info()

virtual std::ostream & concepts::QuadratureRule1dGaussLobatto::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

◆ n()

virtual uint concepts::QuadratureRule1dGaussLobatto::n ( ) const
inlinevirtual

Returns the number of points.

Implements concepts::QuadratureRule1d.

Definition at line 105 of file quadRule.hh.

◆ printRule()

virtual void concepts::QuadratureRule1d::printRule ( )
virtualinherited

print weights and abscissas to stdout

Reimplemented in concepts::AdaptiveQuadratureRule1d< ruleType >.

◆ weights()

virtual const Real * concepts::QuadratureRule1dDynamic::weights ( ) const
inlinevirtualinherited

Returns a pointer into the array of the weights.

Implements concepts::QuadratureRule1d.

Reimplemented in concepts::QuadratureRule1dTrapeze.

Definition at line 63 of file quadRule.hh.

Member Data Documentation

◆ abscissas_

const Real* concepts::QuadratureRule1dDynamic::abscissas_
protectedinherited

Abscissas.

Definition at line 66 of file quadRule.hh.

◆ weights_

const Real* concepts::QuadratureRule1dDynamic::weights_
protectedinherited

Weights.

Definition at line 68 of file quadRule.hh.


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