OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::TriangleQuadratureRule Class Referenceabstract

A "rule" (weights and quadrature points) for computing quadrature over triangular domains. More...

#include <TriangleQuadratureRule.hpp>

+ Inheritance diagram for OpenMD::TriangleQuadratureRule:

Public Member Functions

 TriangleQuadratureRule (const TriangleQuadratureRule &)=default
 
TriangleQuadratureRuleoperator= (const TriangleQuadratureRule &)=default
 
 TriangleQuadratureRule (TriangleQuadratureRule &&)=default
 
TriangleQuadratureRuleoperator= (TriangleQuadratureRule &&)=default
 
int order () const
 Returns the order of this rule.
 
const std::vector< Vector2d > & quadrature_points () const
 Returns the vector of quadrature points. These are returned as the first two barycentric coordinates b0 b1; the third is just b2 = 1 - b0 - b1. Each of these has a corresponding weight returned by weights().
 
const std::vector< RealType > & weights () const
 Returns the vector of weights. These sum to 1 and there is one weight for each point returned by quadrature_points().
 

Protected Member Functions

virtual int do_order () const =0
 Derived classes shall return the order (>= 1) of this rule.
 
virtual const std::vector< Vector2d > & do_quadrature_points () const =0
 Derived classes shall return the vector of quadrature points. Each of these Vector2d objects represents the barycentric coordinates of a triangle (the third barycentric coordinate is implicit: it is the difference between unity and the sum of the other two coordinates).
 
virtual const std::vector< RealType > & do_weights () const =0
 Derived classes shall return the vector of weights. The sum of all weights must equal 1.0.
 

Detailed Description

A "rule" (weights and quadrature points) for computing quadrature over triangular domains.

Definition at line 18 of file TriangleQuadratureRule.hpp.

Constructor & Destructor Documentation

◆ ~TriangleQuadratureRule()

virtual OpenMD::TriangleQuadratureRule::~TriangleQuadratureRule ( )
inlinevirtual

Definition at line 25 of file TriangleQuadratureRule.hpp.

Member Function Documentation

◆ order()

◆ quadrature_points()

const std::vector< Vector2d > & OpenMD::TriangleQuadratureRule::quadrature_points ( ) const
inline

Returns the vector of quadrature points. These are returned as the first two barycentric coordinates b0 b1; the third is just b2 = 1 - b0 - b1. Each of these has a corresponding weight returned by weights().

Definition at line 38 of file TriangleQuadratureRule.hpp.

References do_quadrature_points().

Referenced by OpenMD::TriangleQuadrature< NumericReturnType, T >::Integrate().

◆ weights()

const std::vector< RealType > & OpenMD::TriangleQuadratureRule::weights ( ) const
inline

Returns the vector of weights. These sum to 1 and there is one weight for each point returned by quadrature_points().

Definition at line 44 of file TriangleQuadratureRule.hpp.

References do_weights().

Referenced by OpenMD::TriangleQuadrature< NumericReturnType, T >::Integrate().


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