quadrature_jacobi.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_JACOBI_H
21 #define LIBMESH_QUADRATURE_JACOBI_H
22 
23 // Local includes
24 #include "libmesh/quadrature.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 
32 // ------------------------------------------------------------
33 // QJacobi class definition
34 
35 
52 class QJacobi : public QBase
53 {
54  public:
55 
61  QJacobi (const unsigned int _dim,
62  const Order _order=INVALID_ORDER,
63  const unsigned int _alpha=1,
64  const unsigned int _beta=0);
65 
69  ~QJacobi() {}
70 
75  QuadratureType type() const;
76 
77 
78  private:
79  const unsigned int _alpha;
80  const unsigned int _beta;
81 
82  void init_1D (const ElemType _type=INVALID_ELEM,
83  unsigned int p_level=0);
84 
85 };
86 
87 
88 
89 
90 // ------------------------------------------------------------
91 // QJacobi class members
92 inline
93 QJacobi::QJacobi(const unsigned int d,
94  const Order o,
95  const unsigned int a,
96  const unsigned int b) : QBase(d,o), _alpha(a), _beta(b)
97 {
98  // explicitly call the init function in 1D since the
99  // other tensor-product rules require this one.
100  // note that EDGE will not be used internally, however
101  // if we called the function with INVALID_ELEM it would try to
102  // be smart and return, thinking it had already done the work.
103  if (_dim == 1)
104  init(EDGE2);
105 }
106 
107 
108 
109 inline
111 {
112  if ((_alpha == 1) && (_beta == 0))
113  return QJACOBI_1_0;
114 
115  else if ((_alpha == 2) && (_beta == 0))
116  return QJACOBI_2_0;
117 
118  else
119  {
120  libmesh_error();
121  return INVALID_Q_RULE;
122  }
123 }
124 
125 
126 } // namespace libMesh
127 
128 
129 #endif // LIBMESH_QUADRATURE_JACOBI_H

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

Hosted By:
SourceForge.net Logo