libMesh
quadrature_composite.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_QUADRATURE_COMPOSITE_H
21 #define LIBMESH_QUADRATURE_COMPOSITE_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #if defined(LIBMESH_HAVE_TRIANGLE) && defined(LIBMESH_HAVE_TETGEN)
26 
27 // Local includes
28 #include "libmesh/quadrature.h"
29 #include "libmesh/elem_cutter.h"
30 #include "libmesh/fe_base.h"
31 #include "libmesh/auto_ptr.h"
32 
33 namespace libMesh
34 {
35 
48 template <class QSubCell>
49 class QComposite libmesh_final : public QSubCell
50 {
51 public:
52 
56  using QSubCell::_dim;
57  using QSubCell::_points;
58  using QSubCell::_weights;
59  using QSubCell::init;
60 
64  QComposite (const unsigned int _dim,
65  const Order _order=INVALID_ORDER);
66 
70  ~QComposite();
71 
75  virtual QuadratureType type() const libmesh_override { return QCOMPOSITE; }
76 
81  virtual void init (const Elem & elem,
82  const std::vector<Real> & vertex_distance_func,
83  unsigned int p_level=0) libmesh_override;
84 
85 private:
86 
91  void add_subelem_values (const std::vector<Elem const *> & subelem);
92 
96  QSubCell _q_subcell;
97 
102 
107 };
108 
109 } // namespace libMesh
110 
111 #endif // LIBMESH_HAVE_TRIANGLE && LIBMESH_HAVE_TETGEN
112 #endif // LIBMESH_QUADRATURE_COMPOSITE_H
QuadratureType
Defines an enum for currently available quadrature rules.
virtual QuadratureType type() const libmesh_override
ElemCutter _elem_cutter
ElemCutter object.
UniquePtr< FEBase > _lagrange_fe
Lagrange FE to use for subcell mapping.
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
The libMesh namespace provides an interface to certain functionality in the library.
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
This class implements cutting a single element into a collection of subelements.
Definition: elem_cutter.h:59
QSubCell _q_subcell
Subcell quadrature object.
void init(triangulateio &t)
Initializes the fields of t to NULL/0 as necessary.
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32