Flow123d  DF_patch_fe_data_tables-398e8e7
quadrature_lib.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file quadrature_lib.hh
15  * @brief Definitions of particular quadrature rules on simplices.
16  * @author Jan Stebel
17  */
18 
19 #ifndef QUADRATURE_LIB_HH_
20 #define QUADRATURE_LIB_HH_
21 
22 #include <array>
23 #include "quadrature/quadrature.hh"
24 
25 
26 
27 /**
28  * @brief Symmetric Gauss-Legendre quadrature formulae on simplices.
29  *
30  * Symmetric Gauss-Legendre quadrature on a @p dim dimensional simplex.
31  * The coefficients are taken from Parallel Hierarchical Grid project.
32  *
33  */
34 class QGauss : public Quadrature {
35 public:
36  typedef std::array<QGauss, 4> array;
37  /**
38  * Create a
39  */
40  inline static std::array<QGauss, 4> make_array(unsigned int order)
41  {
42  return {QGauss(0, order), QGauss(1, order), QGauss(2, order), QGauss(3, order)};
43  }
44 
45  /**
46  * @brief Create a formula of given order.
47  *
48  * The formula is exact for polynomials of degree @p order.
49  */
50  QGauss(unsigned int dim, const unsigned int order);
51 
52  template<uint dimension>
53  void init(uint order);
54 };
55 
56 
57 
58 
59 
60 #endif /* QUADRATURE_LIB_HH_ */
Symmetric Gauss-Legendre quadrature formulae on simplices.
QGauss(unsigned int dim, const unsigned int order)
Create a formula of given order.
void init(uint order)
std::array< QGauss, 4 > array
static std::array< QGauss, 4 > make_array(unsigned int order)
Base class for quadrature rules on simplices in arbitrary dimensions.
Definition: quadrature.hh:48
unsigned int dim() const
Definition: quadrature.hh:72
unsigned int uint
Basic definitions of numerical quadrature rules.