$extrastylesheet
quadrature_composite.h
Go to the documentation of this file.
00001 // The libMesh Finite Element Library.
00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
00003 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 
00019 
00020 #ifndef LIBMESH_QUADRATURE_COMPOSITE_H
00021 #define LIBMESH_QUADRATURE_COMPOSITE_H
00022 
00023 #include "libmesh/libmesh_config.h"
00024 
00025 #if defined(LIBMESH_HAVE_TRIANGLE) && defined(LIBMESH_HAVE_TETGEN)
00026 
00027 // Local includes
00028 #include "libmesh/quadrature.h"
00029 #include "libmesh/elem_cutter.h"
00030 #include "libmesh/fe_base.h"
00031 #include "libmesh/auto_ptr.h"
00032 
00033 // C++ includes
00034 
00035 namespace libMesh
00036 {
00046 // ------------------------------------------------------------
00047 // QComposite class definition
00048 template <class QSubCell>
00049 class QComposite : public QSubCell
00050 {
00051 public:
00052 
00056   using QSubCell::_dim;
00057   using QSubCell::_points;
00058   using QSubCell::_weights;
00059   using QSubCell::init;
00060 
00064   QComposite (const unsigned int _dim,
00065               const Order _order=INVALID_ORDER);
00066 
00070   ~QComposite();
00071 
00075   QuadratureType type() const { return QCOMPOSITE; }
00076 
00085   virtual void init (const Elem &elem,
00086                      const std::vector<Real> &vertex_distance_func,
00087                      unsigned int p_level=0);
00088 
00089 private:
00090 
00094   void add_subelem_values (const std::vector<Elem const*> &subelem);
00095 
00099   QSubCell _q_subcell;
00100 
00104   ElemCutter _elem_cutter;
00105 
00109   UniquePtr<FEBase> _lagrange_fe;
00110 };
00111 
00112 
00113 } // namespace libMesh
00114 
00115 
00116 
00117 #endif // LIBMESH_HAVE_TRIANGLE && LIBMESH_HAVE_TETGEN
00118 #endif // LIBMESH_QUADRATURE_COMPOSITE_H