Flow123d  JS_before_hm-1881-gd692239a6
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_ */
QGauss::init
void init(uint order)
Definition: quadrature_lib.cc:63
QGauss::make_array
static std::array< QGauss, 4 > make_array(unsigned int order)
Definition: quadrature_lib.hh:40
QGauss::QGauss
QGauss(unsigned int dim, const unsigned int order)
Create a formula of given order.
Definition: quadrature_lib.cc:79
uint
unsigned int uint
Definition: mh_dofhandler.hh:101
QGauss::array
std::array< QGauss, 4 > array
Definition: quadrature_lib.hh:36
Quadrature::dim
unsigned int dim() const
Definition: quadrature.hh:72
QGauss
Symmetric Gauss-Legendre quadrature formulae on simplices.
Definition: quadrature_lib.hh:34
quadrature.hh
Basic definitions of numerical quadrature rules.
Quadrature
Base class for quadrature rules on simplices in arbitrary dimensions.
Definition: quadrature.hh:48