quadrature_simpson.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_SIMPSON_H
21 #define LIBMESH_QUADRATURE_SIMPSON_H
22 
23 // Local includes
24 #include "libmesh/quadrature.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 
32 
33 
42 // ------------------------------------------------------------
43 // QSimpson class definition
44 
45 class QSimpson : public QBase
46 {
47  public:
48 
52  explicit
53  QSimpson (const unsigned int _dim);
54 
58  ~QSimpson() {}
59 
63  QuadratureType type() const { return QSIMPSON; }
64 
65 
66  private:
67 
68  void init_1D (const ElemType _type=INVALID_ELEM,
69  unsigned int p_level=0);
70  void init_2D (const ElemType _type=INVALID_ELEM,
71  unsigned int p_level=0);
72  void init_3D (const ElemType _type=INVALID_ELEM,
73  unsigned int p_level=0);
74 
75 };
76 
77 
78 
79 // ------------------------------------------------------------
80 // QSimpson class members
81 inline
82 QSimpson::QSimpson(const unsigned int d) : QBase(d,THIRD)
83 {
84  // explicitly call the init function in 1D since the
85  // other tensor-product rules require this one.
86  // note that EDGE will not be used internally, however
87  // if we called the function with INVALID_ELEM it would try to
88  // be smart and return, thinking it had already done the work.
89  if (_dim == 1)
90  init(EDGE2);
91 }
92 
93 
94 } // namespace libMesh
95 
96 
97 
98 #endif // LIBMESH_QUADRATURE_SIMPSON_H

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

Hosted By:
SourceForge.net Logo