inf_fe_jacobi_30_00_eval.C
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 // 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::err << "bad index i = " << i << std::endl;
243  libmesh_error();
244 
245  }
246 
247  // we never end up here.
248  return 0.;
249  } // jacobi_30_00_eval()
250 
251 
252 
253 
254  Real jacobi_30_00_eval_deriv(Real v, unsigned i)
255  {
256  libmesh_assert (-1.-1.e-5 <= v && v < 1.);
257 
258  switch (i)
259  {
260  case 0:
261  return 0.;
262 
263  case 1:
264  return 2.5;
265 
266  case 2:
267  return 10.5*v+4.5;
268 
269  case 3:
270  return (21.+31.5*v)*v;
271 
272  case 4:
273  return -5.5+
274  (-4.5+
275  (67.5+82.5*v)*v)*v;
276 
277  case 5:
278  return -1.40625+
279  (-39.375+
280  (-30.9375+
281  (185.625+201.09375*v)*v)*v)*v;
282 
283  case 6:
284  return 6.09375+
285  (-5.15625+
286  (-175.3125+
287  (-134.0625+
288  (469.21875+469.21875*v)*v)*v)*v)*v;
289 
290  case 7:
291  return 2.40625+
292  (57.75+
293  (-625.625+
294  (-469.21875+
295  (1126.125+1063.5625*v)*v)*v)*v*v)*v;
296 
297  case 8:
298  return -6.5625+
299  (17.0625+
300  (324.1875+
301  (85.3125+
302  (-1962.1875+
303  (-1450.3125+
304  (2610.5625+2361.9375*v)*v)*v)*v)*v)*v)*v;
305 
306  case 9:
307  return -3.19921875+
308  (-76.78125+
309  (63.984375+
310  (1407.65625+
311  (543.8671875+
312  (-5656.21875+
313  (-4133.390625+
314  (5904.84375+5166.73828125*v)*v)*v)*v)*v)*v)*v)*v;
315 
316  case 10:
317  return 6.97265625+
318  (-30.76171875+
319  (-516.796875+
320  (139.453125+
321  (5229.4921875+
322  (2384.6484375+
323  (-15367.734375+
324  (-11128.359375+
325  (13115.56640625+11172.51953125*v)*v)*v)*v)*v)*v)*v)*v)*v;
326 
327  case 11:
328  return 3.8671875+
329  (96.6796875+
330  (-164.35546875+
331  (-2629.6875+
332  (17487.421875+
333  (8743.7109375+
334  (-39971.25+
335  (-28729.3359375+
336  (28729.3359375+23941.11328125*v)*v)*v)*v)*v)*v*v)*v)*v)*v;
337 
338  case 12:
339  return -7.34765625+
340  (46.01953125+
341  (756.03515625+
342  (-624.55078125+
343  (-11241.9140625+
344  (-1748.7421875+
345  (54211.0078125+
346  (28729.3359375+
347  (-100552.67578125+
348  (-71823.33984375+
349  (62246.89453125+50929.27734375*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
350 
351  case 13:
352  return -4.4512939453125+
353  (-117.51416015625+
354  (304.468505859375+
355  (4397.87841796875+
356  (-1776.066284179688+
357  (-42625.59082031249+
358  (-10893.20654296875+
359  (158729.5810546875+
360  (87534.69543457031+
361  (-246393.9575195312+
362  (-175069.3908691406+
363  (133689.3530273438+107694.2010498047*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
364 
365  case 14:
366  return 7.6981201171875+
367  (-62.6846923828125+
368  (-1044.744873046875+
369  (1462.642822265625+
370  (21208.32092285156+
371  (-3364.078491210938+
372  (-148019.4536132813+
373  (-48058.26416015625+
374  (444538.9434814453+
375  (252305.8868408203+
376  (-591116.6491699219+
377  (-418106.8981933594+
378  (285072.8851318359+226596.3958740234*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
379 
380  case 15:
381  return 4.9749755859375+
382  (139.29931640625+
383  (-487.547607421875+
384  (-6825.66650390625+
385  (5606.797485351563+
386  (89708.759765625+
387  (-480582.6416015625+
388  (-180218.4906005859+
389  (1201456.604003906+
390  (696844.8303222656+
391  (-1393689.660644531+
392  (-981917.7154541016+
393  (604257.0556640625+474773.4008789063*v)*v)*v)*v)*v)*v)*v)*v*v)*v)*v)*v)*v)*v;
394 
395  case 16:
396  return -8.02978515625+
397  (80.64697265625+
398  (1385.66162109375+
399  (-2754.21630859375+
400  (-36591.73095703125+
401  (17705.67626953125+
402  (344277.0385742188+
403  (37940.73486328125+
404  (-1479688.659667969+
405  (-611267.3950195313+
406  (3154139.758300781+
407  (1860475.671386719+
408  (-3238605.798339844+
409  (-2273914.709472656+
410  (1274391.760253906+991193.5913085938*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
411 
412  case 17:
413  return -5.452835083007813+
414  (-162.027099609375+
415  (716.6583251953125+
416  (10033.21655273438+
417  (-12541.52069091797+
418  (-170564.6813964844+
419  (45149.47448730469+
420  (1225485.736083984+
421  (233809.7785949707+
422  (-4364449.200439453+
423  (-1932827.503051758+
424  (8082733.194580078+
425  (4832068.757629395+
426  (-7433951.934814453+
427  (-5203766.354370117+
428  (2676222.696533203+2062921.661911011*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
429 
430  case 18:
431  return 8.346176147460938+
432  (-99.8202667236328+
433  (-1781.407836914063+
434  (4607.089233398438+
435  (59124.31182861328+
436  (-48374.43695068359+
437  (-715941.6668701171+
438  (80163.35266113281+
439  (4108371.823883056+
440  (1035443.305206299+
441  (-12425319.66247559+
442  (-5798482.509155273+
443  (20294688.78204345+
444  (12266020.69244385+
445  (-16885690.82336426+
446  (-11788123.78234863+
447  (5599358.796615601+4281862.609176635*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
448 
449 
450  default:
451  libMesh::err << "bad index i = " << i << std::endl;
452  libmesh_error();
453 
454  }
455 
456  // we never end up here.
457  return 0.;
458  } // jacobi_30_00_eval_deriv()
459 
460 
461  } // anonymous namespace
462 
463 
464 
465  // Specialize the eval() function for 1, 2, and 3 dimensions and the CARTESIAN mapping type
466  // to call the local helper function from the anonymous namespace.
467  template <> Real InfFE<1,JACOBI_30_00,CARTESIAN>::eval(Real v, Order, unsigned i) { return jacobi_30_00_eval(v, i); }
468  template <> Real InfFE<2,JACOBI_30_00,CARTESIAN>::eval(Real v, Order, unsigned i) { return jacobi_30_00_eval(v, i); }
469  template <> Real InfFE<3,JACOBI_30_00,CARTESIAN>::eval(Real v, Order, unsigned i) { return jacobi_30_00_eval(v, i); }
470 
471  // Specialize the eval_deriv() function for 1, 2, and 3 dimensions and the CARTESIAN mapping type
472  // to call the local helper function from the anonymous namespace.
473  template <> Real InfFE<1,JACOBI_30_00,CARTESIAN>::eval_deriv(Real v, Order, unsigned i) { return jacobi_30_00_eval_deriv(v, i); }
474  template <> Real InfFE<2,JACOBI_30_00,CARTESIAN>::eval_deriv(Real v, Order, unsigned i) { return jacobi_30_00_eval_deriv(v, i); }
475  template <> Real InfFE<3,JACOBI_30_00,CARTESIAN>::eval_deriv(Real v, Order, unsigned i) { return jacobi_30_00_eval_deriv(v, i); }
476 
477 } // namespace libMesh
478 
479 #endif // LIBMESH_ENABLE_INFINITE_ELEMENTS

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

Hosted By:
SourceForge.net Logo