quadrature_trap.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 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_TRAP_H
21 #define LIBMESH_QUADRATURE_TRAP_H
22 
23 // Local includes
24 #include "libmesh/quadrature.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 
32 // ------------------------------------------------------------
33 // QTrap class definition
34 
35 
41 class QTrap : public QBase
42 {
43  public:
44 
48  explicit
49  QTrap (const unsigned int _dim);
50 
54  ~QTrap() {}
55 
59  QuadratureType type() const { return QTRAP; }
60 
61  private:
62 
63  void init_1D (const ElemType _type=INVALID_ELEM,
64  unsigned int p_level=0);
65  void init_2D (const ElemType _type=INVALID_ELEM,
66  unsigned int p_level=0);
67  void init_3D (const ElemType _type=INVALID_ELEM,
68  unsigned int p_level=0);
69 
70 };
71 
72 // ------------------------------------------------------------
73 // QTrap class members
74 inline
75 QTrap::QTrap(const unsigned int d) : QBase(d,FIRST)
76 {
77  // explicitly call the init function in 1D since the
78  // other tensor-product rules require this one.
79  // note that EDGE will not be used internally, however
80  // if we called the function with INVALID_ELEM it would try to
81  // be smart and return, thinking it had already done the work.
82  if (_dim == 1)
83  init(EDGE2);
84 }
85 
86 
87 } // namespace libMesh
88 
89 
90 
91 #endif // LIBMESH_QUADRATURE_TRAP_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo