quadrature(7rheolef) rheolef-6.1 quadrature(7rheolef)NAME
quadrature - quadrature formulae on the reference lement
SYNOPSYS
The quadrature class defines a container for a quadrature formulae on the reference element (see reference_element(2)). This container
stores the nodes coordinates and the weights.
THE CONSTRUCTOR TAKES TWO ARGUMENTS
the reference element K and the order r of the quadrature formulae. The formulae is exact when computing the integral of a polynom p that
degree is less or equal to order r.
n
/ ___
| p(x) dx = p(x_q) w_q
/ K /__
q=1
LIMITATIONS
The formulae is optimal when it uses a minimal number of nodes n. Optimal quadrature formula are hard-coded in this class. Not all refer-
ence elements and orders are yet implemented. This class will be completed in the future.
IMPLEMENTATION
template<class T>
class quadrature {
public:
// typedefs:
typedef typename quadrature_on_geo<T>::size_type size_type;
typedef quadrature_option_type::family_type family_type;
typedef typename std::vector<weighted_point<T> >::const_iterator const_iterator;
// allocators:
quadrature (quadrature_option_type opt = quadrature_option_type());
// modifiers:
void set_order (size_type order);
void set_family (family_type ft);
// accessors:
size_type get_order() const;
family_type get_family() const;
std::string get_family_name() const;
size_type size (reference_element hat_K) const;
const_iterator begin (reference_element hat_K) const;
const_iterator end (reference_element hat_K) const;
template<class U>
friend std::ostream& operator<< (std::ostream&, const quadrature<U>&);
protected:
quadrature_option_type _options;
mutable quadrature_on_geo<T> _quad [reference_element::max_variant];
mutable std::vector<bool> _initialized;
void _initialize (reference_element hat_K) const;
private:
quadrature (const quadrature<T>&);
quadrature operator= (const quadrature<T>&);
};
SEE ALSO reference_element(2)rheolef-6.1 rheolef-6.1 quadrature(7rheolef)