inf_fe_jacobi_30_00_eval.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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 // Local Includes
20 #include "libmesh/libmesh_config.h"
21 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
22 #include "libmesh/inf_fe.h"
23 
24 namespace libMesh
25 {
26 
27 // Anonymous namespace for local helper functions
28 namespace {
29 
30 Real jacobi_30_00_eval(Real v, unsigned i)
31 {
32  libmesh_assert (-1.-1.e-5 <= v && v < 1.);
33 
34  switch (i)
35  {
36  case 0:
37  return 1.;
38 
39  case 1:
40  return 2.5+2.5*v;
41 
42  case 2:
43  return -.75+(4.5+5.25*v)*v;
44 
45  case 3:
46  return (10.5+10.5*v)*v*v;
47 
48  case 4:
49  return -1.375+
50  (-5.5+
51  (-2.25+
52  (22.5+20.625*v)*v)*v)*v;
53 
54  case 5:
55  return 1.78125+
56  (-1.40625+
57  (-19.6875+
58  (-10.3125+
59  (46.40625+40.21875*v)*v)*v)*v)*v;
60 
61  case 6:
62  return -.609375+
63  (6.09375+
64  (-2.578125+
65  (-58.4375+
66  (-33.515625+
67  (93.84375+78.203125*v)*v)*v)*v)*v)*v;
68 
69  case 7:
70  return .34375+
71  (2.40625+
72  (28.875+
73  (-156.40625+
74  (-93.84375+
75  (187.6875+151.9375*v)*v)*v)*v*v)*v)*v;
76 
77  case 8:
78  return -1.3828125+
79  (-6.5625+
80  (8.53125+
81  (108.0625+
82  (21.328125+
83  (-392.4375+
84  (-241.71875+
85  (372.9375+295.2421875*v)*v)*v)*v)*v)*v)*v)*v;
86 
87  case 9:
88  return 1.57421875+
89  (-3.19921875+
90  (-38.390625+
91  (21.328125+
92  (351.9140625+
93  (108.7734375+
94  (-942.703125+
95  (-590.484375+
96  (738.10546875+574.08203125*v)*v)*v)*v)*v)*v)*v)*v)*v;
97 
98  case 10:
99  return -.6308593750004547+
100  (6.97265625+
101  (-15.380859375+
102  (-172.265625+
103  (34.86328125+
104  (1045.8984375+
105  (397.4414062499999+
106  (-2195.390625+
107  (-1391.044921875+
108  (1457.28515625+1117.251953125*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
109 
110  case 11:
111  return .484375+
112  (3.8671875+
113  (48.33984375+
114  (-54.78515625+
115  (-657.421875+
116  (2914.5703125+
117  (1249.1015625+
118  (-4996.40625+
119  (-3192.1484375+
120  (2872.93359375+2176.46484375*v)*v)*v)*v)*v)*v*v)*v)*v)*v)*v;
121 
122  case 12:
123  return -1.3544921875+
124  (-7.34765625+
125  (23.009765625+
126  (252.01171875+
127  (-156.1376953125+
128  (-2248.3828125+
129  (-291.45703125+
130  (7744.4296875+
131  (3591.1669921875+
132  (-11172.51953125+
133  (-7182.333984375+
134  (5658.80859375+4244.1064453125*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
135 
136  case 13:
137  return 1.471313476557931+
138  (-4.4512939453125+
139  (-58.75708007812499+
140  (101.489501953125+
141  (1099.469604492188+
142  (-355.2132568359375+
143  (-7104.265136718749+
144  (-1556.17236328125+
145  (19841.19763183594+
146  (9726.077270507813+
147  (-24639.39575195312+
148  (-15915.39916992187+
149  (11140.77941894531+8284.169311523438*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
150 
151  case 14:
152  return -.65960693359375+
153  (7.6981201171875+
154  (-31.34234619140625+
155  (-348.248291015625+
156  (365.6607055664063+
157  (4241.664184570313+
158  (-560.6797485351563+
159  (-21145.63623046875+
160  (-6007.283020019531+
161  (49393.21594238281+
162  (25230.58868408203+
163  (-53737.87719726563+
164  (-34842.24151611328+
165  (21928.68347167969+16185.45684814453*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
166 
167  case 15:
168  return .5635986328125+
169  (4.9749755859375+
170  (69.649658203125+
171  (-162.515869140625+
172  (-1706.416625976563+
173  (1121.359497070313+
174  (14951.4599609375+
175  (-60072.83020019531+
176  (-20024.27673339844+
177  (120145.6604003906+
178  (63349.53002929688+
179  (-116140.8050537109+
180  (-75532.13195800781+
181  (43161.21826171875+31651.56005859375*v)*v)*v)*v)*v)*v)*v)*v*v)*v)*v)*v)*v)*v)*v;
182 
183  case 16:
184  return -1.327301025390625+
185  (-8.02978515625+
186  (40.323486328125+
187  (461.88720703125+
188  (-688.5540771484375+
189  (-7318.34619140625+
190  (2950.946044921875+
191  (49182.43408203125+
192  (4742.591857910156+
193  (-164409.8510742188+
194  (-61126.73950195313+
195  (286739.9780273438+
196  (155039.6392822266+
197  (-249123.5229492188+
198  (-162422.4792480469+
199  (84959.45068359375+61949.59945678711*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
200 
201  case 17:
202  return 1.408035278320313+
203  (-5.452835083007813+
204  (-81.0135498046875+
205  (238.8861083984375+
206  (2508.304138183594+
207  (-2508.304138183594+
208  (-28427.44689941406+
209  (6449.924926757813+
210  (153185.717010498+
211  (25978.86428833008+
212  (-436444.9200439453+
213  (-175711.5911865234+
214  (673561.0995483398+
215  (371697.5967407227+
216  (-530996.5667724609+
217  (-346917.7569580078+
218  (167263.9185333252+121348.3330535889*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
219 
220  case 18:
221  return -.6847000124835247+
222  (8.346176147460938+
223  (-49.9101333618164+
224  (-593.8026123046875+
225  (1151.772308349609+
226  (11824.86236572266+
227  (-8062.406158447265+
228  (-102277.3809814453+
229  (10020.4190826416+
230  (456485.7582092285+
231  (103544.3305206299+
232  (-1129574.514770508+
233  (-483206.8757629394+
234  (1561129.906311035+
235  (876144.3351745604+
236  (-1125712.721557617+
237  (-736757.7363967896+
238  (329374.0468597412+237881.2560653686*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
239 
240 
241  default:
242  libmesh_error_msg("bad index i = " << i);
243  }
244 } // jacobi_30_00_eval()
245 
246 
247 
248 
249 Real jacobi_30_00_eval_deriv(Real v, unsigned i)
250 {
251  libmesh_assert (-1.-1.e-5 <= v && v < 1.);
252 
253  switch (i)
254  {
255  case 0:
256  return 0.;
257 
258  case 1:
259  return 2.5;
260 
261  case 2:
262  return 10.5*v+4.5;
263 
264  case 3:
265  return (21.+31.5*v)*v;
266 
267  case 4:
268  return -5.5+
269  (-4.5+
270  (67.5+82.5*v)*v)*v;
271 
272  case 5:
273  return -1.40625+
274  (-39.375+
275  (-30.9375+
276  (185.625+201.09375*v)*v)*v)*v;
277 
278  case 6:
279  return 6.09375+
280  (-5.15625+
281  (-175.3125+
282  (-134.0625+
283  (469.21875+469.21875*v)*v)*v)*v)*v;
284 
285  case 7:
286  return 2.40625+
287  (57.75+
288  (-625.625+
289  (-469.21875+
290  (1126.125+1063.5625*v)*v)*v)*v*v)*v;
291 
292  case 8:
293  return -6.5625+
294  (17.0625+
295  (324.1875+
296  (85.3125+
297  (-1962.1875+
298  (-1450.3125+
299  (2610.5625+2361.9375*v)*v)*v)*v)*v)*v)*v;
300 
301  case 9:
302  return -3.19921875+
303  (-76.78125+
304  (63.984375+
305  (1407.65625+
306  (543.8671875+
307  (-5656.21875+
308  (-4133.390625+
309  (5904.84375+5166.73828125*v)*v)*v)*v)*v)*v)*v)*v;
310 
311  case 10:
312  return 6.97265625+
313  (-30.76171875+
314  (-516.796875+
315  (139.453125+
316  (5229.4921875+
317  (2384.6484375+
318  (-15367.734375+
319  (-11128.359375+
320  (13115.56640625+11172.51953125*v)*v)*v)*v)*v)*v)*v)*v)*v;
321 
322  case 11:
323  return 3.8671875+
324  (96.6796875+
325  (-164.35546875+
326  (-2629.6875+
327  (17487.421875+
328  (8743.7109375+
329  (-39971.25+
330  (-28729.3359375+
331  (28729.3359375+23941.11328125*v)*v)*v)*v)*v)*v*v)*v)*v)*v;
332 
333  case 12:
334  return -7.34765625+
335  (46.01953125+
336  (756.03515625+
337  (-624.55078125+
338  (-11241.9140625+
339  (-1748.7421875+
340  (54211.0078125+
341  (28729.3359375+
342  (-100552.67578125+
343  (-71823.33984375+
344  (62246.89453125+50929.27734375*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
345 
346  case 13:
347  return -4.4512939453125+
348  (-117.51416015625+
349  (304.468505859375+
350  (4397.87841796875+
351  (-1776.066284179688+
352  (-42625.59082031249+
353  (-10893.20654296875+
354  (158729.5810546875+
355  (87534.69543457031+
356  (-246393.9575195312+
357  (-175069.3908691406+
358  (133689.3530273438+107694.2010498047*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
359 
360  case 14:
361  return 7.6981201171875+
362  (-62.6846923828125+
363  (-1044.744873046875+
364  (1462.642822265625+
365  (21208.32092285156+
366  (-3364.078491210938+
367  (-148019.4536132813+
368  (-48058.26416015625+
369  (444538.9434814453+
370  (252305.8868408203+
371  (-591116.6491699219+
372  (-418106.8981933594+
373  (285072.8851318359+226596.3958740234*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
374 
375  case 15:
376  return 4.9749755859375+
377  (139.29931640625+
378  (-487.547607421875+
379  (-6825.66650390625+
380  (5606.797485351563+
381  (89708.759765625+
382  (-480582.6416015625+
383  (-180218.4906005859+
384  (1201456.604003906+
385  (696844.8303222656+
386  (-1393689.660644531+
387  (-981917.7154541016+
388  (604257.0556640625+474773.4008789063*v)*v)*v)*v)*v)*v)*v)*v*v)*v)*v)*v)*v)*v;
389 
390  case 16:
391  return -8.02978515625+
392  (80.64697265625+
393  (1385.66162109375+
394  (-2754.21630859375+
395  (-36591.73095703125+
396  (17705.67626953125+
397  (344277.0385742188+
398  (37940.73486328125+
399  (-1479688.659667969+
400  (-611267.3950195313+
401  (3154139.758300781+
402  (1860475.671386719+
403  (-3238605.798339844+
404  (-2273914.709472656+
405  (1274391.760253906+991193.5913085938*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
406 
407  case 17:
408  return -5.452835083007813+
409  (-162.027099609375+
410  (716.6583251953125+
411  (10033.21655273438+
412  (-12541.52069091797+
413  (-170564.6813964844+
414  (45149.47448730469+
415  (1225485.736083984+
416  (233809.7785949707+
417  (-4364449.200439453+
418  (-1932827.503051758+
419  (8082733.194580078+
420  (4832068.757629395+
421  (-7433951.934814453+
422  (-5203766.354370117+
423  (2676222.696533203+2062921.661911011*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
424 
425  case 18:
426  return 8.346176147460938+
427  (-99.8202667236328+
428  (-1781.407836914063+
429  (4607.089233398438+
430  (59124.31182861328+
431  (-48374.43695068359+
432  (-715941.6668701171+
433  (80163.35266113281+
434  (4108371.823883056+
435  (1035443.305206299+
436  (-12425319.66247559+
437  (-5798482.509155273+
438  (20294688.78204345+
439  (12266020.69244385+
440  (-16885690.82336426+
441  (-11788123.78234863+
442  (5599358.796615601+4281862.609176635*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
443 
444 
445  default:
446  libmesh_error_msg("bad index i = " << i);
447  }
448 } // jacobi_30_00_eval_deriv()
449 
450 
451 } // anonymous namespace
452 
453 
454 
455  // Specialize the eval() function for 1, 2, and 3 dimensions and the CARTESIAN mapping type
456  // to call the local helper function from the anonymous namespace.
457 template <> Real InfFE<1,JACOBI_30_00,CARTESIAN>::eval(Real v, Order, unsigned i) { return jacobi_30_00_eval(v, i); }
458 template <> Real InfFE<2,JACOBI_30_00,CARTESIAN>::eval(Real v, Order, unsigned i) { return jacobi_30_00_eval(v, i); }
459 template <> Real InfFE<3,JACOBI_30_00,CARTESIAN>::eval(Real v, Order, unsigned i) { return jacobi_30_00_eval(v, i); }
460 
461 // Specialize the eval_deriv() function for 1, 2, and 3 dimensions and the CARTESIAN mapping type
462 // to call the local helper function from the anonymous namespace.
463 template <> Real InfFE<1,JACOBI_30_00,CARTESIAN>::eval_deriv(Real v, Order, unsigned i) { return jacobi_30_00_eval_deriv(v, i); }
464 template <> Real InfFE<2,JACOBI_30_00,CARTESIAN>::eval_deriv(Real v, Order, unsigned i) { return jacobi_30_00_eval_deriv(v, i); }
465 template <> Real InfFE<3,JACOBI_30_00,CARTESIAN>::eval_deriv(Real v, Order, unsigned i) { return jacobi_30_00_eval_deriv(v, i); }
466 
467 } // namespace libMesh
468 
469 #endif // LIBMESH_ENABLE_INFINITE_ELEMENTS
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real