ParMooN
 All Classes Functions Variables Friends Pages
NF_D_T_P4_2D.h
1 /*
2  TNodalFunctional2D(NodalFunctional2D id,
3  int n_allfunctionals, int n_edgefunctionals,
4  int n_pointsall, int n_pointsedge,
5  double *xi, double *eta, double *t,
6  DoubleFunctVect *evalall,
7  DoubleFunctVect *evaledge);
8 */
9 
10 static double NF_D_T_P4_2D_Xi[15] = {
11  0.5133469206394541, 0.3132512106717253, 0.6517753036487957,
12  0.6510199345893917E-1, 0.345792011168269, 0.2810412473151104,
13  0.6306214343189561, 0.313477887523733, 0.8701651015635631,
14  0.3623168221569262E1, 0.2056118320454355, 0.5612735500931855E-1,
15  0.3474680882747129E-1, 0.6473290497749777E-1, -0.2968960232737531E1 };
16 
17 static double NF_D_T_P4_2D_Eta[15] = {
18  0.2810412473151104, 0.6306214343189561, 0.313477887523733,
19  0.8701651015635631, 0.3623168221569262E1, 0.2056118320454355,
20  0.5612735500931855E-1, 0.3474680882747129E-1, 0.6473290497749777E-1,
21  -0.2968960232737531E1, 0.5133469206394541, 0.3132512106717253,
22  0.6517753036487957, 0.6510199345893917E-1, 0.345792011168269 };
23 
24 
25 void NF_D_T_P4_2D_EvalAll(TCollection *Coll, TBaseCell *Cell, double *PointValues,
26  double *Functionals)
27 {
28  // w = 1
29  static double w0[15] = {
30  .6694076763991617e-1, .4390955679122078e-1, .2928571764016589e-1,
31  .2653062443478038e-1, .1605834385668122e-9, .6694076763991617e-1,
32  .4390955679122078e-1, .2928571764016589e-1, .2653062443478038e-1,
33  .1605834385668122e-9, .6694076763991617e-1, .4390955679122078e-1,
34  .2928571764016589e-1, .2653062443478038e-1, .1605834385668122e-9 };
35 
36  // w = 2*xi+eta-1
37  static double w1[15] = {
38  .206000230602212159639612674e-1,
39  .112901945425861017222420458e-1, .180701222752738674862483255e-1,
40  .97921478843262528732922309e-5, .532294313323449923963583090e-9,
41  -.155507200994391637926030882e-1, .139355858590805187649833588e-1,
42  -.990728260703628961071419105e-2, .213588269674207752751667694e-1,
43  .526292341343259634598983724e-9, -.504930296078205217135817915e-2,
44  -.252257804016666270736589233e-1, -.816283966823757875410566365e-2,
45  -.213686191153050983443651294e-1, -.105858665466670955856256681e-8 };
46 
47  // w = xi+2*eta-1
48  static double w2[15] = {
49  .504930296078205217135817915e-2,
50  .252257804016666226827032442e-1, .816283966823757816839131085e-2,
51  .213686191153051004668150842e-1, .105858665466670955856256681e-8,
52  -.206000230602212159639612674e-1, -.112901945425861061131977249e-1,
53  -.180701222752738680719626783e-1, -.97921478843241304233374485e-5,
54  -.532294313323449923963583090e-9, .155507200994391637926030882e-1,
55  -.139355858590805231559390379e-1, .990728260703628902499983824e-2,
56  -.213588269674207731527168146e-1, -.526292341343259634598983724e-9 };
57 
58  // w = 180*xi^2-144*xi+18
59  static double w3[15] = {
60  -.568156124079284425650535186, -.414744933005904824948405918,
61  .178743806420368160315568071e-1, .249074847088649157782787817,
62  -.164936356339311421349730024e-8, -.552447878790230913240060076,
63  -.538540055385875246772541652e-1, -.276823431356913745202383217,
64  .769121212943481332920287488, .298554546528607794604190635e-6,
65  -.267654842645618735714108454, .460379025174421416935243448,
66  .386975055198890286625307968, .250256071129305517599417835,
67  .326334572456962693640367494e-6 };
68 
69  // w = 360*xi*eta-72*xi-72*eta+18
70  static double w4[15] = {
71  .852949160223896603176486808, .928977963718913494773585717,
72  .645924105913767177288007812, -.767939988902824845017883949,
73  .294293894917480132496741587e-7, .251946597356565223303633344,
74  -.821269952641738785770211250, -.922772431999396988470543191e-1,
75  -.770302436984137564792150915, -.626538482548963602458055430e-6,
76  .283363087934672248124583564, -.994880977071039343873622809e-1,
77  -.681672867197840856981151753, .269790294725526477915740096,
78  -.261306623649617848226795582e-7 };
79 
80  // w = 180*eta^2-144*eta+18
81  static double w5[15] = {
82  -.552447878790230913240060076,
83  -.538540055385875246772541652e-1, -.276823431356913745202383217,
84  .769121212943481332920287488, .298554546528607794604190635e-6,
85  -.267654842645618735714108454, .460379025174421416935243448,
86  .386975055198890286625307968, .250256071129305517599417835,
87  .326334572456962693640367494e-6, -.568156124079284425650535186,
88  -.414744933005904824948405918, .178743806420368160315568071e-1,
89  .249074847088649157782787817, -.164936356339311421349730024e-8 };
90 
91  // 35*xi^3-45*xi^2+15*xi-1
92  static double w6[15] = {
93  -.283582300812142314864875229e-1,
94  .157600324085359098022255315e-1, -.190070260589904781867463408e-1,
95  -.542644219965077966003735613e-2, .406730337639505305471483802e-10,
96  .293370559238441772914955737e-1, -.289303678459884980822835164e-1,
97  .104920404810938679338774661e-1, .275859250926960655799067950e-1,
98  .181026916911544332889429182e-6, .325321795238610297791925570e-1,
99  -.128946421695611868701754462e-1, -.155700419125490718558154235e-1,
100  -.552044613055773574787347754e-2, -.218099108980700210189162121e-6 };
101 
102  // 105*xi^2*eta-60*xi*eta-15*xi^2+10*xi+5*eta-1
103  static double w7[15] = {
104  .472567169306760663658070139e-1,
105  -.676818513328929399517743523e-1, .713599033825593937884471142e-1,
106  .245817333396178085819438091e-1, -.175075129056328751103916923e-8,
107  -.724344547436548992447909943e-2, -.695572540194121786964284835e-2,
108  .157987544488321124145029297e-1, -.415370051759828139164174601e-1,
109  -.581863021060588212948512507e-6, -.713289786794576036778561628e-1,
110  .566322349972855693713038826e-2, .384238526960336452592664918e-1,
111  -.833663002182206502225356168e-2, .354027868461204908497880664e-7 };
112 
113  // 105*xi*eta^2-60*xi*eta-158eta^2=5*xi+10*eta-1
114  static double w8[15] = {
115  -.807677222971670419500076218e-1,
116  .937468289399066925339941225e-1, -.472748758921137151939194844e-1,
117  -.412207701021053485512960996e-1, .387822703259552142802249597e-7,
118  -.262675598921254856597215084e-1, .330207030089549993633697615e-1,
119  .828627304161356941731930473e-2, .248979684134952739171531599e-1,
120  .618894540095980139717698298e-6, .378179733129666280936555549e-1,
121  .204017541072852182112868982e-1, -.143388252055879623028106437e-1,
122  -.830240674066546796871400745e-2, .162873218927143591939772409e-8 };
123 
124  // 35*eta^3-45*eta^2+15*eta-1
125  static double w9[15] = {
126  .293370559238441772914955737e-1, -.289303678459884980822835164e-1,
127  .104920404810938679338774661e-1, .275859250926960655799067950e-1,
128  .181026916911544332889429182e-6, .325321795238610297791925570e-1,
129  -.128946421695611868701754462e-1, -.155700419125490718558154235e-1,
130  -.552044613055773574787347754e-2, -.218099108980700210189162121e-6,
131  -.283582300812142314864875229e-1, .157600324085359098022255315e-1,
132  -.190070260589904781867463408e-1, -.542644219965077966003735613e-2,
133  .406730337639505305471483802e-10 };
134 
135  // 126*xi^4-224*xi^3+126*xi^2-24*xi+1:
136  static double w10[15] = {
137  .221767308627192790731057838e-1,
138  .762966838390765433457705185e-2, -.116943725176883175552288990e-1,
139  -.233386148664526976200066638e-2, .492695122875488653688224976e-10,
140  .138956063914820570481510846e-2, -.121226872459650998707182898e-1,
141  .511844273204934938973536974e-2, .458667993997063190145207201e-2,
142  .202773605370327817929277680e-5, -.220771067553461410490535003e-1,
143  .505936135607316659040987976e-3, .904893850824439171228863726e-2,
144  -.223266044184371696482408914e-2, .270346051855358960039121004e-5 };
145 
146  // 504*xi^3*eta+1-18*xi-6*eta+63*xi^2+126*xi*eta-56*xi^3-504*xi^2*eta:
147  static double w11[15] = {
148  -.593850102393492470686138462e-1,
149  -.214896763642209307535780894e-1, .297848223036231999841425693e-1,
150  .686684127724466548920153410e-2, -.108070797989861472219013971e-8,
151  -.109250599679565181918467558e-1, .275034022478316083366964602e-1,
152  -.568908912708172747139696201e-2, -.943820270386623476471406851e-2,
153  -.879445675195838933072176304e-5, .673317007142630778027258182e-1,
154  .196043956928960775238882782e-2, -.290417506217523237324422229e-1,
155  .253104540365830776994193708e-2, -.666954223600022711654758158e-6 };
156 
157  // 756*xi^2*eta^2+1-12*xi-12*eta+21*xi^2+21*eta^2+168*xi*eta-336*xi^2*eta-336*xi*eta^2:
158  static double w12[15] = {
159  .837479457077192586905313168e-2,
160  .550128462585687444490579899e-2, .624727791375825138104382341e-3,
161  -.244380311639749815591620249e-2, -.675663382735412659540126963e-8,
162  .328126106397522462157027483e-1, -.427279864184728747971790117e-2,
163  -.130186612196750903788218604e-1, -.164927464462249928130641159e-2,
164  .142101972998281447898132270e-4, -.367198509709601408981537041e-1,
165  -.131897341633600061349066994e-1, .198129595961155305009788046e-1,
166  .415355179546487742060410306e-2, -.970314069332467756975875379e-8 };
167 
168  // 504*xi*eta^3+1-18*eta-6*xi+63*eta^2+126*xi*eta-56*eta^3-504*xi*eta^2:
169  static double w13[15] = {
170  .536681741136369537258632193e-2,
171  .209873467360287924132811255e-1, -.147846818011156699401349118e-1,
172  -.890851705601623543636072237e-2, .683512537145276613550655826e-6,
173  .209767263071214863934881832e-1, -.398418411171887345200876298e-2,
174  -.715400341122524246971515244e-2, .639959636371656028156548574e-2,
175  -.101468878506143356899100820e-4, -.293219132115278692238092890e-1,
176  -.902899717140968550023859389e-2, .169926677671300697778305007e-1,
177  .246860466933641377722977765e-2, .883629930748419260714849723e-9 };
178 
179  // 126*eta^4-224*eta^3+126*eta^2-24*eta+1:
180  static double w14[15] = {
181  .138956063914820570481510846e-2,
182  -.121226872459650998707182898e-1, .511844273204934938973536974e-2,
183  .458667993997063190145207201e-2, .202773605370327817929277680e-5,
184  -.220771067553461410490535003e-1, .505936135607316659040987976e-3,
185  .904893850824439171228863726e-2, -.223266044184371696482408914e-2,
186  .270346051855358960039121004e-5, .221767308627192790731057838e-1,
187  .762966838390765433457705185e-2, -.116943725176883175552288990e-1,
188  -.233386148664526976200066638e-2, .492695122875488653688224976e-10 };
189 
190  Functionals[0] = PointValues[ 0]*w0[ 0] +PointValues[ 1]*w0[ 1]
191  +PointValues[ 2]*w0[ 2] +PointValues[ 3]*w0[ 3]
192  +PointValues[ 4]*w0[ 4] +PointValues[ 5]*w0[ 5]
193  +PointValues[ 6]*w0[ 6] +PointValues[ 7]*w0[ 7]
194  +PointValues[ 8]*w0[ 8] +PointValues[ 9]*w0[ 9]
195  +PointValues[10]*w0[10] +PointValues[11]*w0[11]
196  +PointValues[12]*w0[12] +PointValues[13]*w0[13]
197  +PointValues[14]*w0[14];
198  Functionals[0] *= 2;
199  Functionals[1] = PointValues[ 0]*w1[ 0] +PointValues[ 1]*w1[ 1]
200  +PointValues[ 2]*w1[ 2] +PointValues[ 3]*w1[ 3]
201  +PointValues[ 4]*w1[ 4] +PointValues[ 5]*w1[ 5]
202  +PointValues[ 6]*w1[ 6] +PointValues[ 7]*w1[ 7]
203  +PointValues[ 8]*w1[ 8] +PointValues[ 9]*w1[ 9]
204  +PointValues[10]*w1[10] +PointValues[11]*w1[11]
205  +PointValues[12]*w1[12] +PointValues[13]*w1[13]
206  +PointValues[14]*w1[14];
207  Functionals[2] = PointValues[ 0]*w2[ 0] +PointValues[ 1]*w2[ 1]
208  +PointValues[ 2]*w2[ 2] +PointValues[ 3]*w2[ 3]
209  +PointValues[ 4]*w2[ 4] +PointValues[ 5]*w2[ 5]
210  +PointValues[ 6]*w2[ 6] +PointValues[ 7]*w2[ 7]
211  +PointValues[ 8]*w2[ 8] +PointValues[ 9]*w2[ 9]
212  +PointValues[10]*w2[10] +PointValues[11]*w2[11]
213  +PointValues[12]*w2[12] +PointValues[13]*w2[13]
214  +PointValues[14]*w2[14];
215  Functionals[3] = PointValues[ 0]*w3[ 0] +PointValues[ 1]*w3[ 1]
216  +PointValues[ 2]*w3[ 2] +PointValues[ 3]*w3[ 3]
217  +PointValues[ 4]*w3[ 4] +PointValues[ 5]*w3[ 5]
218  +PointValues[ 6]*w3[ 6] +PointValues[ 7]*w3[ 7]
219  +PointValues[ 8]*w3[ 8] +PointValues[ 9]*w3[ 9]
220  +PointValues[10]*w3[10] +PointValues[11]*w3[11]
221  +PointValues[12]*w3[12] +PointValues[13]*w3[13]
222  +PointValues[14]*w3[14];
223  Functionals[4] = PointValues[ 0]*w4[ 0] +PointValues[ 1]*w4[ 1]
224  +PointValues[ 2]*w4[ 2] +PointValues[ 3]*w4[ 3]
225  +PointValues[ 4]*w4[ 4] +PointValues[ 5]*w4[ 5]
226  +PointValues[ 6]*w4[ 6] +PointValues[ 7]*w4[ 7]
227  +PointValues[ 8]*w4[ 8] +PointValues[ 9]*w4[ 9]
228  +PointValues[10]*w4[10] +PointValues[11]*w4[11]
229  +PointValues[12]*w4[12] +PointValues[13]*w4[13]
230  +PointValues[14]*w4[14];
231  Functionals[5] = PointValues[ 0]*w5[ 0] +PointValues[ 1]*w5[ 1]
232  +PointValues[ 2]*w5[ 2] +PointValues[ 3]*w5[ 3]
233  +PointValues[ 4]*w5[ 4] +PointValues[ 5]*w5[ 5]
234  +PointValues[ 6]*w5[ 6] +PointValues[ 7]*w5[ 7]
235  +PointValues[ 8]*w5[ 8] +PointValues[ 9]*w5[ 9]
236  +PointValues[10]*w5[10] +PointValues[11]*w5[11]
237  +PointValues[12]*w5[12] +PointValues[13]*w5[13]
238  +PointValues[14]*w5[14];
239  Functionals[6] = PointValues[ 0]*w6[ 0] +PointValues[ 1]*w6[ 1]
240  +PointValues[ 2]*w6[ 2] +PointValues[ 3]*w6[ 3]
241  +PointValues[ 4]*w6[ 4] +PointValues[ 5]*w6[ 5]
242  +PointValues[ 6]*w6[ 6] +PointValues[ 7]*w6[ 7]
243  +PointValues[ 8]*w6[ 8] +PointValues[ 9]*w6[ 9]
244  +PointValues[10]*w6[10] +PointValues[11]*w6[11]
245  +PointValues[12]*w6[12] +PointValues[13]*w6[13]
246  +PointValues[14]*w6[14];
247  Functionals[7] = PointValues[ 0]*w7[ 0] +PointValues[ 1]*w7[ 1]
248  +PointValues[ 2]*w7[ 2] +PointValues[ 3]*w7[ 3]
249  +PointValues[ 4]*w7[ 4] +PointValues[ 5]*w7[ 5]
250  +PointValues[ 6]*w7[ 6] +PointValues[ 7]*w7[ 7]
251  +PointValues[ 8]*w7[ 8] +PointValues[ 9]*w7[ 9]
252  +PointValues[10]*w7[10] +PointValues[11]*w7[11]
253  +PointValues[12]*w7[12] +PointValues[13]*w7[13]
254  +PointValues[14]*w7[14];
255  Functionals[8] = PointValues[ 0]*w8[ 0] +PointValues[ 1]*w8[ 1]
256  +PointValues[ 2]*w8[ 2] +PointValues[ 3]*w8[ 3]
257  +PointValues[ 4]*w8[ 4] +PointValues[ 5]*w8[ 5]
258  +PointValues[ 6]*w8[ 6] +PointValues[ 7]*w8[ 7]
259  +PointValues[ 8]*w8[ 8] +PointValues[ 9]*w8[ 9]
260  +PointValues[10]*w8[10] +PointValues[11]*w8[11]
261  +PointValues[12]*w8[12] +PointValues[13]*w8[13]
262  +PointValues[14]*w8[14];
263  Functionals[9] = PointValues[ 0]*w9[ 0] +PointValues[ 1]*w9[ 1]
264  +PointValues[ 2]*w9[ 2] +PointValues[ 3]*w9[ 3]
265  +PointValues[ 4]*w9[ 4] +PointValues[ 5]*w9[ 5]
266  +PointValues[ 6]*w9[ 6] +PointValues[ 7]*w9[ 7]
267  +PointValues[ 8]*w9[ 8] +PointValues[ 9]*w9[ 9]
268  +PointValues[10]*w9[10] +PointValues[11]*w9[11]
269  +PointValues[12]*w9[12] +PointValues[13]*w9[13]
270  +PointValues[14]*w9[14];
271  Functionals[10]= PointValues[ 0]*w10[ 0] +PointValues[ 1]*w10[ 1]
272  +PointValues[ 2]*w10[ 2] +PointValues[ 3]*w10[ 3]
273  +PointValues[ 4]*w10[ 4] +PointValues[ 5]*w10[ 5]
274  +PointValues[ 6]*w10[ 6] +PointValues[ 7]*w10[ 7]
275  +PointValues[ 8]*w10[ 8] +PointValues[ 9]*w10[ 9]
276  +PointValues[10]*w10[10] +PointValues[11]*w10[11]
277  +PointValues[12]*w10[12] +PointValues[13]*w10[13]
278  +PointValues[14]*w10[14];
279  Functionals[11]= PointValues[ 0]*w11[ 0] +PointValues[ 1]*w11[ 1]
280  +PointValues[ 2]*w11[ 2] +PointValues[ 3]*w11[ 3]
281  +PointValues[ 4]*w11[ 4] +PointValues[ 5]*w11[ 5]
282  +PointValues[ 6]*w11[ 6] +PointValues[ 7]*w11[ 7]
283  +PointValues[ 8]*w11[ 8] +PointValues[ 9]*w11[ 9]
284  +PointValues[10]*w11[10] +PointValues[11]*w11[11]
285  +PointValues[12]*w11[12] +PointValues[13]*w11[13]
286  +PointValues[14]*w11[14];
287  Functionals[12]= PointValues[ 0]*w12[ 0] +PointValues[ 1]*w12[ 1]
288  +PointValues[ 2]*w12[ 2] +PointValues[ 3]*w12[ 3]
289  +PointValues[ 4]*w12[ 4] +PointValues[ 5]*w12[ 5]
290  +PointValues[ 6]*w12[ 6] +PointValues[ 7]*w12[ 7]
291  +PointValues[ 8]*w12[ 8] +PointValues[ 9]*w12[ 9]
292  +PointValues[10]*w12[10] +PointValues[11]*w12[11]
293  +PointValues[12]*w12[12] +PointValues[13]*w12[13]
294  +PointValues[14]*w12[14];
295  Functionals[13]= PointValues[ 0]*w13[ 0] +PointValues[ 1]*w13[ 1]
296  +PointValues[ 2]*w13[ 2] +PointValues[ 3]*w13[ 3]
297  +PointValues[ 4]*w13[ 4] +PointValues[ 5]*w13[ 5]
298  +PointValues[ 6]*w13[ 6] +PointValues[ 7]*w13[ 7]
299  +PointValues[ 8]*w13[ 8] +PointValues[ 9]*w13[ 9]
300  +PointValues[10]*w13[10] +PointValues[11]*w13[11]
301  +PointValues[12]*w13[12] +PointValues[13]*w13[13]
302  +PointValues[14]*w13[14];
303  Functionals[14]= PointValues[ 0]*w14[ 0] +PointValues[ 1]*w14[ 1]
304  +PointValues[ 2]*w14[ 2] +PointValues[ 3]*w14[ 3]
305  +PointValues[ 4]*w14[ 4] +PointValues[ 5]*w14[ 5]
306  +PointValues[ 6]*w14[ 6] +PointValues[ 7]*w14[ 7]
307  +PointValues[ 8]*w14[ 8] +PointValues[ 9]*w14[ 9]
308  +PointValues[10]*w14[10] +PointValues[11]*w14[11]
309  +PointValues[12]*w14[12] +PointValues[13]*w14[13]
310  +PointValues[14]*w14[14];
311 }
312 
313 void NF_D_T_P4_2D_EvalEdge(TCollection *Coll, TBaseCell *Cell, int Joint, double *PointValues,
314  double *Functionals)
315 {
316 }
317 
318 TNodalFunctional2D *NF_D_T_P4_2D_Obj = new TNodalFunctional2D
319  (NF_D_T_P4_2D, 15, 0, 15, 0, NF_D_T_P4_2D_Xi, NF_D_T_P4_2D_Eta,
320  NULL, NF_D_T_P4_2D_EvalAll, NF_D_T_P4_2D_EvalEdge);
321 
store cells in an array, used by cell iterators
Definition: Collection.h:18
Definition: NodalFunctional2D.h:20
information for finite element data structure
Definition: BaseCell.h:25