Intrepid
Intrepid_CubatureDirectLineGaussJacobi20Def.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Intrepid Package
5 // Copyright (2007) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Pavel Bochev (pbboche@sandia.gov)
38 // Denis Ridzal (dridzal@sandia.gov), or
39 // Kara Peterson (kjpeter@sandia.gov)
40 //
41 // ************************************************************************
42 // @HEADER
43 
49 namespace Intrepid {
50 
51 template <class Scalar, class ArrayPoint, class ArrayWeight>
53  this->degree_ = degree;
54  this->dimension_ = 1;
55  TEUCHOS_TEST_FOR_EXCEPTION((degree < 0) || (degree > INTREPID_CUBATURE_LINE_GAUSSJACOBI20_MAX_ENUM),
56  std::out_of_range,
57  ">>> ERROR (CubatureDirectLineGaussJacobi20): No cubature rule implemented for the desired polynomial degree.");
58 } // end constructor
59 
60 
61 
62 template <class Scalar, class ArrayPoint, class ArrayWeight>
64  return cubature_data_;
65 }
66 
67 
68 
69 template <class Scalar, class ArrayPoint, class ArrayWeight>
71  return INTREPID_CUBATURE_LINE_GAUSSJACOBI20_MAX_ENUM;
72 }
73 
74 
75 
76 template <class Scalar, class ArrayPoint, class ArrayWeight>
78  return cubature_name_;
79 } // end getName
80 
81 
82 
83 template <class Scalar, class ArrayPoint, class ArrayWeight>
84 const char* CubatureDirectLineGaussJacobi20<Scalar,ArrayPoint,ArrayWeight>::cubature_name_ = "INTREPID_CUBATURE_LINE_GAUSSJACOBI20";
85 
86 
87 //-------------------------------------------------------------------------------------//
88 // Definition of cubature templates //
89 //-------------------------------------------------------------------------------------//
90 
91 /*
92  Cubature templates for lines are defined the reference cell:
93 
94  Line -> (-1,0,0),(1,0,0)
95 */
96 
97 /*
98  This static const member contains templates for GaussJacobi20(-Legendre) rules.
99 */
100 
101 template <class Scalar, class ArrayPoint, class ArrayWeight>
102 const CubatureTemplate CubatureDirectLineGaussJacobi20<Scalar,ArrayPoint,ArrayWeight>::cubature_data_[INTREPID_CUBATURE_LINE_GAUSSJACOBI20_MAX_ENUM+1] =
103 {
104 
105  // Collection of GaussJacobi20 rules on [-1,1]
106  // The rule with array index i is exact for polynomials up to order i
107  {
108  1,
109  {{-0.5, 0.0, 0.0}},
110  {2.66666666666666666666666666}
111  },
112  {
113  1,
114  {{-0.5, 0.0, 0.0}},
115  {2.66666666666666666666666666}
116  },
117  {
118  2,
119  {{-7.549703546891172e-1, 0.0, 0.0},
120  {8.830368802245062e-2, 0.0, 0.0}},
121  {1.860379610028064,
122  8.062870566386037e-01}
123  },
124  {
125  2,
126  {{-7.549703546891172e-1, 0.0, 0.0},
127  {8.830368802245062e-2, 0.0, 0.0}},
128  {1.860379610028064,
129  8.062870566386037e-01}
130  },
131  {
132  3,
133  {{-8.540119518537008e-01, 0.0, 0.0},
134  {-3.059924679232963e-01, 0.0, 0.0},
135  { 4.100044197769969e-01, 0.0, 0.0}},
136  {1.257090888519093e+00,
137  1.169970154078928e+00,
138  2.396056240686456e-01}
139  },
140  {
141  3,
142  {{-8.540119518537008e-01, 0.0, 0.0},
143  {-3.059924679232963e-01, 0.0, 0.0},
144  { 4.100044197769969e-01, 0.0, 0.0}},
145  {1.257090888519093e+00,
146  1.169970154078928e+00,
147  2.396056240686456e-01}
148  },
149  {
150  4,
151  {{-9.029989011060054e-01, 0.0, 0.0},
152  {-5.227985248962754e-01, 0.0, 0.0},
153  {3.409459020873505e-02, 0.0, 0.0},
154  {5.917028357935457e-01, 0.0, 0.0}},
155  {8.871073248902235e-01,
156  1.147670318393715e+00,
157  5.490710973833849e-01,
158  8.281792599934450e-02}
159  },
160  {
161  4,
162  {{-9.029989011060054e-01, 0.0, 0.0},
163  {-5.227985248962754e-01, 0.0, 0.0},
164  {3.409459020873505e-02, 0.0, 0.0},
165  {5.917028357935457e-01, 0.0, 0.0}},
166  {8.871073248902235e-01,
167  1.147670318393715e+00,
168  5.490710973833849e-01,
169  8.281792599934450e-02}
170  },
171  {
172  5,
173  {{-9.308421201635699e-01, 0.0, 0.0},
174  {-6.530393584566085e-01, 0.0, 0.0},
175  {-2.202272258689614e-01, 0.0, 0.0},
176  {2.686669452617736e-01, 0.0, 0.0},
177  {7.021084258940329e-01, 0.0, 0.0}},
178  {6.541182742861678e-01,
179  1.009591695199292e+00,
180  7.136012897727201e-01,
181  2.564448057836956e-01,
182  3.291060162479211e-02}
183  },
184  {
185  5,
186  {{-9.308421201635699e-01, 0.0, 0.0},
187  {-6.530393584566085e-01, 0.0, 0.0},
188  {-2.202272258689614e-01, 0.0, 0.0},
189  {2.686669452617736e-01, 0.0, 0.0},
190  {7.021084258940329e-01, 0.0, 0.0}},
191  {6.541182742861678e-01,
192  1.009591695199292e+00,
193  7.136012897727201e-01,
194  2.564448057836956e-01,
195  3.291060162479211e-02}
196  },
197  {
198  6,
199  {{-9.481908898126656e-01, 0.0, 0.0},
200  {-7.368721166840297e-01, 0.0, 0.0},
201  {-3.951261639542174e-01, 0.0, 0.0},
202  {1.807282632950432e-02, 0.0, 0.0},
203  {4.313622546234276e-01, 0.0, 0.0},
204  {7.736112323551237e-01, 0.0, 0.0}},
205  {5.003096218126469e-01,
206  8.590119978942462e-01,
207  7.566174939883307e-01,
208  4.103165690369299e-01,
209  1.257623774795603e-01,
210  1.464860645495425e-02}
211  },
212  {
213  6,
214  {{-9.481908898126656e-01, 0.0, 0.0},
215  {-7.368721166840297e-01, 0.0, 0.0},
216  {-3.951261639542174e-01, 0.0, 0.0},
217  {1.807282632950432e-02, 0.0, 0.0},
218  {4.313622546234276e-01, 0.0, 0.0},
219  {7.736112323551237e-01, 0.0, 0.0}},
220  {5.003096218126469e-01,
221  8.590119978942462e-01,
222  7.566174939883307e-01,
223  4.103165690369299e-01,
224  1.257623774795603e-01,
225  1.464860645495425e-02}
226  } // end GaussJacobi20
227 
228 };
229 
230 } // end namespace Intrepid
231 
232 #if defined(Intrepid_SHOW_DEPRECATED_WARNINGS)
233 #ifdef __GNUC__
234 #warning "The Intrepid package is deprecated"
235 #endif
236 #endif
237 
int getMaxAccuracy() const
Returns maximum cubature accuracy.
const CubatureTemplate * exposeCubatureData() const
Exposes cubature data.
Template for the cubature rules used by Intrepid. Cubature template consists of cubature points and c...
Defines GaussJacobi20 integration rules on a line.