HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
quadraturerule.hpp
Go to the documentation of this file.
1 //
2 // Provides:
3 // - Generation of quadrature rules over cells and faces of the mesh
4 //
5 // Author: Daniele Di Pietro (daniele.di-pietro@umontpellier.fr)
6 // Author: Jérome Droniou (jerome.droniou@monash.edu)
7 //
8 
9 /*
10  *
11  * This library was developed around HHO methods, although some parts of it have a more
12  * general purpose. If you use this code or part of it in a scientific publication,
13  * please mention the following book as a reference for the underlying principles
14  * of HHO schemes:
15  *
16  * The Hybrid High-Order Method for Polytopal Meshes: Design, Analysis, and Applications.
17  * D. A. Di Pietro and J. Droniou. Modeling, Simulation and Applications, vol. 19.
18  * Springer International Publishing, 2020, xxxi + 525p. doi: 10.1007/978-3-030-37203-3.
19  * url: https://hal.archives-ouvertes.fr/hal-02151813.
20  *
21  */
22 
23 #ifndef QUADRATURERULE_HPP
24 #define QUADRATURERULE_HPP
25 
26 #include <vector>
27 
28 #include <mesh.hpp>
29 //#include <cell.hpp>
30 //#include <edge.hpp>
31 
32 namespace HArDCore2D {
33 
41  {
42  double x, y, w;
43  QuadratureNode(double x, double y, double w)
44  : x(x), y(y), w(w)
45  {
46  // Do nothing
47  }
48 
50  inline Eigen::Vector2d vector() const {
51  return Eigen::Vector2d(x,y);
52  }
53  };
54 
55  typedef std::vector<QuadratureNode> QuadratureRule;
56 
59  const Cell & T,
60  const int doe,
61  const bool force_split = false
62  );
66  const Edge & E,
67  const int doe
68  );
70 } // end of namespace HArDCore2D
71 #endif
Polytope< DIMENSION > Cell
Definition: Polytope2D.hpp:151
Polytope< 1 > Edge
A Face is a Polytope with object_dim = DIMENSION - 1.
Definition: Polytope2D.hpp:147
std::vector< QuadratureNode > QuadratureRule
Definition: quadraturerule.hpp:55
Eigen::Vector2d vector() const
Returns the quadrature point as an Eigen vector.
Definition: quadraturerule.hpp:50
double w
Definition: quadraturerule.hpp:42
double x
Definition: quadraturerule.hpp:42
double y
Definition: quadraturerule.hpp:42
QuadratureRule generate_quadrature_rule(const Cell &T, const int doe, const bool force_split)
Generate quadrature rule on mesh element.
Definition: quadraturerule.cpp:10
QuadratureNode(double x, double y, double w)
Definition: quadraturerule.hpp:43
if(strcmp(field, 'real')) % real valued entries T
Definition: mmread.m:93
Definition: ddr-klplate.hpp:27
Description of one node and one weight from a quadrature rule.
Definition: quadraturerule.hpp:41