30 #ifndef QUADRATURE_HH_
31 #define QUADRATURE_HH_
49 template<
unsigned int dim>
56 Quadrature(
const unsigned int n_quadrature_points = 0);
68 void resize(
const unsigned int n_q_points);
71 const unsigned int size()
const;
74 const arma::vec::fixed<dim> &
point(
const unsigned int i)
const;
84 void set_point(
const unsigned int i,
const arma::vec::fixed<dim> &p);
87 double weight(
const unsigned int i)
const;
93 void set_weight(
const unsigned int i,
const double w);
114 template<
unsigned int dim>
120 template<
unsigned int dim>
122 quadrature_points(q.quadrature_points),
126 template<
unsigned int dim>
129 arma::vec::fixed<dim> v;
131 quadrature_points.resize(n_q, v);
132 weights.resize(n_q, 0);
135 template<
unsigned int dim>
137 return weights.size();
140 template<
unsigned int dim>
142 const unsigned int i)
const {
143 return quadrature_points[i];
146 template<
unsigned int dim>
148 return quadrature_points;
151 template<
unsigned int dim>
154 quadrature_points[i] = p;
157 template<
unsigned int dim>
162 template<
unsigned int dim>
167 template<
unsigned int dim>
173 template<
unsigned int dim>
void set_weight(const unsigned int i, const double w)
Sets individual quadrature weight.
std::vector< double > weights
List of weights to the quadrature points.
Quadrature(const unsigned int n_quadrature_points=0)
Constructor.
std::vector< arma::vec::fixed< dim > > quadrature_points
List of quadrature points.
const std::vector< arma::vec::fixed< dim > > & get_points() const
Return a reference to the whole array of quadrature points.
Base class for quadrature rules on simplices in arbitrary dimensions.
virtual ~Quadrature()
Virtual destructor.
double weight(const unsigned int i) const
Returns the ith weight.
void resize(const unsigned int n_q_points)
Modify the number of quadrature points.
void set_point(const unsigned int i, const arma::vec::fixed< dim > &p)
Sets individual quadrature point coordinates.
const unsigned int size() const
Returns number of quadrature points.
const std::vector< double > & get_weights() const
Return a reference to the whole array of weights.
const arma::vec::fixed< dim > & point(const unsigned int i) const
Returns the ith quadrature point.