Manpages

NAME

quadrature - quadrature formulae on the reference lement

SYNOPSIS

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 reference elements and orders are yet implemented. This class will be completed in the future.

IMPLEMENTATION

template<class T>
class quadrature : public smart_pointer<quadrature_rep<T> > {
public:

// typedefs:

typedef quadrature_rep<T> rep;
typedef smart_pointer<rep> base;
typedef typename rep::size_type size_type;
typedef typename rep::family_type family_type;
typedef typename rep::const_iterator const_iterator;
typedef typename rep::orientation_type orientation_type;

// allocators:

quadrature (quadrature_option opt = quadrature_option())
: base(new_macro(rep(opt))) {}

// modifiers:

void set_order (size_type order) { base::data().set_order(order); }
void set_family (family_type ft) { base::data().set_family(ft); }

// accessors:

size_type get_order() const { return base::data().get_order();}
family_type get_family() const { return base::data().get_family();}
std::string get_family_name() const { return base::data().get_family_name();}
const quadrature_option& get_options() const { return base::data().get_options(); }
size_type size (reference_element hat_K) const { return base::data().size(hat_K); }
const_iterator begin (reference_element hat_K) const { return base::data().begin(hat_K); }
const_iterator end (reference_element hat_K) const { return base::data().end(hat_K); }
const weighted_point<T>& operator() (reference_element hat_K, size_type q) const
{ return base::data().operator() (hat_K,q); }
// side accessor:

void side_initialize (
reference_element tilde_K,
size_type loc_isid,
reference_element hat_S,
size_type shift,
orientation_type orient) const {
base::data().side_initialize (tilde_K, loc_isid, hat_S, shift, orient);
}
};

SEE ALSO

reference_element(2)

COPYRIGHT

Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito [AT] imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.