ParMooN
 All Classes Functions Variables Friends Pages
NF_N_Q_Q3_2D.h
1 
2 static double NF_N_Q_Q3_2D_Xi[32] =
3  {
4  -0.86113631159405257522394649,
5  -0.33998104358485626480266576,
6  0.33998104358485626480266576,
7  0.86113631159405257522394649,
8  1, 1, 1, 1,
9  0.86113631159405257522394649,
10  0.33998104358485626480266576,
11  -0.33998104358485626480266576,
12  -0.86113631159405257522394649,
13  -1, -1, -1, -1,
14 
15  -0.86113631159405257522394649,
16  -0.33998104358485626480266576,
17  0.33998104358485626480266576,
18  0.86113631159405257522394649,
19  -0.86113631159405257522394649,
20  -0.33998104358485626480266576,
21  0.33998104358485626480266576,
22  0.86113631159405257522394649,
23  -0.86113631159405257522394649,
24  -0.33998104358485626480266576,
25  0.33998104358485626480266576,
26  0.86113631159405257522394649,
27  -0.86113631159405257522394649,
28  -0.33998104358485626480266576,
29  0.33998104358485626480266576,
30  0.86113631159405257522394649
31  };
32 
33 static double NF_N_Q_Q3_2D_Eta[32] =
34  { -1, -1, -1, -1,
35  -0.86113631159405257522394649,
36  -0.33998104358485626480266576,
37  0.33998104358485626480266576,
38  0.86113631159405257522394649,
39  1, 1, 1, 1,
40  0.86113631159405257522394649,
41  0.33998104358485626480266576,
42  -0.33998104358485626480266576,
43  -0.86113631159405257522394649,
44 
45  -0.86113631159405257522394649,
46  -0.86113631159405257522394649,
47  -0.86113631159405257522394649,
48  -0.86113631159405257522394649,
49  -0.33998104358485626480266576,
50  -0.33998104358485626480266576,
51  -0.33998104358485626480266576,
52  -0.33998104358485626480266576,
53  0.33998104358485626480266576,
54  0.33998104358485626480266576,
55  0.33998104358485626480266576,
56  0.33998104358485626480266576,
57  0.86113631159405257522394649,
58  0.86113631159405257522394649,
59  0.86113631159405257522394649,
60  0.86113631159405257522394649,
61  };
62 
63 static double NF_N_Q_Q3_2D_T[4] =
64  {
65  -0.86113631159405257522394649,
66  -0.33998104358485626480266576,
67  0.33998104358485626480266576,
68  0.86113631159405257522394649
69  };
70 
71 static double NF_N_Q_Q3_2D_EdgeWeight0[4] = {
72  0.1739274225687269286865319745,
73  0.3260725774312730713134680255,
74  0.3260725774312730713134680255,
75  0.1739274225687269286865319745 };
76 
77 static double NF_N_Q_Q3_2D_EdgeWeight1[4] = {
78  -0.4493256574676810538434880055,
79  -0.3325754854784642078819958520,
80  0.3325754854784642078819958520,
81  0.4493256574676810538434880055 };
82 
83 static double NF_N_Q_Q3_2D_EdgeWeight2[4] = {
84  0.532508042018911499194276175,
85  -0.532508042018911499194276175,
86  -0.532508042018911499194276175,
87  0.532508042018911499194276175 };
88 
89 static double NF_N_Q_Q3_CellWeight0[16] = {
90  .0302507483214005013803030243039, .0567129629629629629629629629461,
91  .0567129629629629629629629629461, .0302507483214005013803030243039,
92  .0567129629629629629629629629461, .106323325752673572693771049804,
93  .106323325752673572693771049804, .0567129629629629629629629629461,
94  .0567129629629629629629629629461, .106323325752673572693771049804,
95  .106323325752673572693771049804, .0567129629629629629629629629461,
96  .0302507483214005013803030243039, .0567129629629629629629629629461,
97  .0567129629629629629629629629461, .0302507483214005013803030243039 };
98 
99 static double NF_N_Q_Q3_CellWeight1[16] = {
100  -.0781500534973524151648919963067, -.0578439969988123506087868827606,
101  .0578439969988123506087868827606, .0781500534973524151648919963067,
102  -.146512775236488111756852006936, -.108443745740419753332211043771,
103  .108443745740419753332211043771, .146512775236488111756852006936,
104  -.146512775236488111756852006936, -.108443745740419753332211043771,
105  .108443745740419753332211043771, .146512775236488111756852006936,
106  -.0781500534973524151648919963067, -.0578439969988123506087868827606,
107  .0578439969988123506087868827606, .0781500534973524151648919963067 };
108 
109 static double NF_N_Q_Q3_CellWeight2[16] = {
110  -.0781500534973524151648919963067, -.146512775236488111756852006936,
111  -.146512775236488111756852006936, -.0781500534973524151648919963067,
112  -.0578439969988123506087868827606, -.108443745740419753332211043771,
113  -.108443745740419753332211043771, -.0578439969988123506087868827606,
114  .0578439969988123506087868827606, .108443745740419753332211043771,
115  .108443745740419753332211043771, .0578439969988123506087868827606,
116  .0781500534973524151648919963067, .146512775236488111756852006936,
117  .146512775236488111756852006936, .0781500534973524151648919963067 };
118 
119 void NF_N_Q_Q3_2D_EvalAll(TCollection *Coll, TBaseCell *Cell, double *PointValues,
120  double *Functionals)
121 {
122  int OwnNum, NeighNum;
123  TBaseCell *neigh;
124 
125  Functionals[0] = ( NF_N_Q_Q3_2D_EdgeWeight0[0]*PointValues[0]
126  +NF_N_Q_Q3_2D_EdgeWeight0[1]*PointValues[1]
127  +NF_N_Q_Q3_2D_EdgeWeight0[2]*PointValues[2]
128  +NF_N_Q_Q3_2D_EdgeWeight0[3]*PointValues[3]);
129  Functionals[1] = ( NF_N_Q_Q3_2D_EdgeWeight0[0]*PointValues[4]
130  +NF_N_Q_Q3_2D_EdgeWeight0[1]*PointValues[5]
131  +NF_N_Q_Q3_2D_EdgeWeight0[2]*PointValues[6]
132  +NF_N_Q_Q3_2D_EdgeWeight0[3]*PointValues[7]);
133  Functionals[2] = ( NF_N_Q_Q3_2D_EdgeWeight0[0]*PointValues[8]
134  +NF_N_Q_Q3_2D_EdgeWeight0[1]*PointValues[9]
135  +NF_N_Q_Q3_2D_EdgeWeight0[2]*PointValues[10]
136  +NF_N_Q_Q3_2D_EdgeWeight0[3]*PointValues[11]);
137  Functionals[3] = ( NF_N_Q_Q3_2D_EdgeWeight0[0]*PointValues[12]
138  +NF_N_Q_Q3_2D_EdgeWeight0[1]*PointValues[13]
139  +NF_N_Q_Q3_2D_EdgeWeight0[2]*PointValues[14]
140  +NF_N_Q_Q3_2D_EdgeWeight0[3]*PointValues[15]);
141 
142  Functionals[4] = ( NF_N_Q_Q3_2D_EdgeWeight1[0]*PointValues[0]
143  +NF_N_Q_Q3_2D_EdgeWeight1[1]*PointValues[1]
144  +NF_N_Q_Q3_2D_EdgeWeight1[2]*PointValues[2]
145  +NF_N_Q_Q3_2D_EdgeWeight1[3]*PointValues[3]);
146  Functionals[5] = ( NF_N_Q_Q3_2D_EdgeWeight1[0]*PointValues[4]
147  +NF_N_Q_Q3_2D_EdgeWeight1[1]*PointValues[5]
148  +NF_N_Q_Q3_2D_EdgeWeight1[2]*PointValues[6]
149  +NF_N_Q_Q3_2D_EdgeWeight1[3]*PointValues[7]);
150  Functionals[6] = ( NF_N_Q_Q3_2D_EdgeWeight1[0]*PointValues[8]
151  +NF_N_Q_Q3_2D_EdgeWeight1[1]*PointValues[9]
152  +NF_N_Q_Q3_2D_EdgeWeight1[2]*PointValues[10]
153  +NF_N_Q_Q3_2D_EdgeWeight1[3]*PointValues[11]);
154  Functionals[7] = ( NF_N_Q_Q3_2D_EdgeWeight1[0]*PointValues[12]
155  +NF_N_Q_Q3_2D_EdgeWeight1[1]*PointValues[13]
156  +NF_N_Q_Q3_2D_EdgeWeight1[2]*PointValues[14]
157  +NF_N_Q_Q3_2D_EdgeWeight1[3]*PointValues[15]);
158 
159  Functionals[8] = ( NF_N_Q_Q3_2D_EdgeWeight2[0]*PointValues[0]
160  +NF_N_Q_Q3_2D_EdgeWeight2[1]*PointValues[1]
161  +NF_N_Q_Q3_2D_EdgeWeight2[2]*PointValues[2]
162  +NF_N_Q_Q3_2D_EdgeWeight2[3]*PointValues[3]);
163  Functionals[9] = ( NF_N_Q_Q3_2D_EdgeWeight2[0]*PointValues[4]
164  +NF_N_Q_Q3_2D_EdgeWeight2[1]*PointValues[5]
165  +NF_N_Q_Q3_2D_EdgeWeight2[2]*PointValues[6]
166  +NF_N_Q_Q3_2D_EdgeWeight2[3]*PointValues[7]);
167  Functionals[10]= ( NF_N_Q_Q3_2D_EdgeWeight2[0]*PointValues[8]
168  +NF_N_Q_Q3_2D_EdgeWeight2[1]*PointValues[9]
169  +NF_N_Q_Q3_2D_EdgeWeight2[2]*PointValues[10]
170  +NF_N_Q_Q3_2D_EdgeWeight2[3]*PointValues[11]);
171  Functionals[11]= ( NF_N_Q_Q3_2D_EdgeWeight2[0]*PointValues[12]
172  +NF_N_Q_Q3_2D_EdgeWeight2[1]*PointValues[13]
173  +NF_N_Q_Q3_2D_EdgeWeight2[2]*PointValues[14]
174  +NF_N_Q_Q3_2D_EdgeWeight2[3]*PointValues[15]);
175 
176  Functionals[12] =( NF_N_Q_Q3_CellWeight0[ 0]*PointValues[16]
177  +NF_N_Q_Q3_CellWeight0[ 1]*PointValues[17]
178  +NF_N_Q_Q3_CellWeight0[ 2]*PointValues[18]
179  +NF_N_Q_Q3_CellWeight0[ 3]*PointValues[19]
180  +NF_N_Q_Q3_CellWeight0[ 4]*PointValues[20]
181  +NF_N_Q_Q3_CellWeight0[ 5]*PointValues[21]
182  +NF_N_Q_Q3_CellWeight0[ 6]*PointValues[22]
183  +NF_N_Q_Q3_CellWeight0[ 7]*PointValues[23]
184  +NF_N_Q_Q3_CellWeight0[ 8]*PointValues[24]
185  +NF_N_Q_Q3_CellWeight0[ 9]*PointValues[25]
186  +NF_N_Q_Q3_CellWeight0[10]*PointValues[26]
187  +NF_N_Q_Q3_CellWeight0[11]*PointValues[27]
188  +NF_N_Q_Q3_CellWeight0[12]*PointValues[28]
189  +NF_N_Q_Q3_CellWeight0[13]*PointValues[29]
190  +NF_N_Q_Q3_CellWeight0[14]*PointValues[30]
191  +NF_N_Q_Q3_CellWeight0[15]*PointValues[31]);
192  Functionals[13] =( NF_N_Q_Q3_CellWeight1[ 0]*PointValues[16]
193  +NF_N_Q_Q3_CellWeight1[ 1]*PointValues[17]
194  +NF_N_Q_Q3_CellWeight1[ 2]*PointValues[18]
195  +NF_N_Q_Q3_CellWeight1[ 3]*PointValues[19]
196  +NF_N_Q_Q3_CellWeight1[ 4]*PointValues[20]
197  +NF_N_Q_Q3_CellWeight1[ 5]*PointValues[21]
198  +NF_N_Q_Q3_CellWeight1[ 6]*PointValues[22]
199  +NF_N_Q_Q3_CellWeight1[ 7]*PointValues[23]
200  +NF_N_Q_Q3_CellWeight1[ 8]*PointValues[24]
201  +NF_N_Q_Q3_CellWeight1[ 9]*PointValues[25]
202  +NF_N_Q_Q3_CellWeight1[10]*PointValues[26]
203  +NF_N_Q_Q3_CellWeight1[11]*PointValues[27]
204  +NF_N_Q_Q3_CellWeight1[12]*PointValues[28]
205  +NF_N_Q_Q3_CellWeight1[13]*PointValues[29]
206  +NF_N_Q_Q3_CellWeight1[14]*PointValues[30]
207  +NF_N_Q_Q3_CellWeight1[15]*PointValues[31]);
208  Functionals[14] =( NF_N_Q_Q3_CellWeight2[ 0]*PointValues[16]
209  +NF_N_Q_Q3_CellWeight2[ 1]*PointValues[17]
210  +NF_N_Q_Q3_CellWeight2[ 2]*PointValues[18]
211  +NF_N_Q_Q3_CellWeight2[ 3]*PointValues[19]
212  +NF_N_Q_Q3_CellWeight2[ 4]*PointValues[20]
213  +NF_N_Q_Q3_CellWeight2[ 5]*PointValues[21]
214  +NF_N_Q_Q3_CellWeight2[ 6]*PointValues[22]
215  +NF_N_Q_Q3_CellWeight2[ 7]*PointValues[23]
216  +NF_N_Q_Q3_CellWeight2[ 8]*PointValues[24]
217  +NF_N_Q_Q3_CellWeight2[ 9]*PointValues[25]
218  +NF_N_Q_Q3_CellWeight2[10]*PointValues[26]
219  +NF_N_Q_Q3_CellWeight2[11]*PointValues[27]
220  +NF_N_Q_Q3_CellWeight2[12]*PointValues[28]
221  +NF_N_Q_Q3_CellWeight2[13]*PointValues[29]
222  +NF_N_Q_Q3_CellWeight2[14]*PointValues[30]
223  +NF_N_Q_Q3_CellWeight2[15]*PointValues[31]);
224 
225  /*
226  if(Cell)
227  {
228  if(Cell->GetVertex(0) > Cell->GetVertex(1))
229  Functionals[4] = -Functionals[4];
230  if(Cell->GetVertex(1) > Cell->GetVertex(2))
231  Functionals[5] = -Functionals[5];
232  if(Cell->GetVertex(2) > Cell->GetVertex(3))
233  Functionals[6] = -Functionals[6];
234  if(Cell->GetVertex(3) > Cell->GetVertex(0))
235  Functionals[7] = -Functionals[7];
236  }
237  */
238 
239  if(Cell)
240  {
241  OwnNum = Coll->GetIndex(Cell);
242 
243  neigh = Cell->GetJoint(0)->GetNeighbour(Cell);
244  if(neigh)
245  {
246  NeighNum = Coll->GetIndex(neigh);
247  if(NeighNum < OwnNum)
248  Functionals[ 4] = -Functionals[ 4];
249  } // endif neigh
250 
251  neigh = Cell->GetJoint(1)->GetNeighbour(Cell);
252  if(neigh)
253  {
254  NeighNum = Coll->GetIndex(neigh);
255  if(NeighNum < OwnNum)
256  Functionals[ 5] = -Functionals[ 5];
257  } // endif neigh
258 
259  neigh = Cell->GetJoint(2)->GetNeighbour(Cell);
260  if(neigh)
261  {
262  NeighNum = Coll->GetIndex(neigh);
263  if(NeighNum < OwnNum)
264  Functionals[ 6] = -Functionals[ 6];
265  } // endif neigh
266 
267  neigh = Cell->GetJoint(3)->GetNeighbour(Cell);
268  if(neigh)
269  {
270  NeighNum = Coll->GetIndex(neigh);
271  if(NeighNum < OwnNum)
272  Functionals[ 7] = -Functionals[ 7];
273  } // endif neigh
274  } // endif Cell
275 }
276 
277 void NF_N_Q_Q3_2D_EvalEdge(TCollection *Coll, TBaseCell *Cell, int Joint,
278  double *PointValues, double *Functionals)
279 {
280  int OwnNum, NeighNum;
281  TBaseCell *neigh;
282 
283  Functionals[0] = ( NF_N_Q_Q3_2D_EdgeWeight0[0]*PointValues[0]
284  +NF_N_Q_Q3_2D_EdgeWeight0[1]*PointValues[1]
285  +NF_N_Q_Q3_2D_EdgeWeight0[2]*PointValues[2]
286  +NF_N_Q_Q3_2D_EdgeWeight0[3]*PointValues[3]);
287 
288  Functionals[1] = ( NF_N_Q_Q3_2D_EdgeWeight1[0]*PointValues[0]
289  +NF_N_Q_Q3_2D_EdgeWeight1[1]*PointValues[1]
290  +NF_N_Q_Q3_2D_EdgeWeight1[2]*PointValues[2]
291  +NF_N_Q_Q3_2D_EdgeWeight1[3]*PointValues[3]);
292 
293  Functionals[2] = ( NF_N_Q_Q3_2D_EdgeWeight2[0]*PointValues[0]
294  +NF_N_Q_Q3_2D_EdgeWeight2[1]*PointValues[1]
295  +NF_N_Q_Q3_2D_EdgeWeight2[2]*PointValues[2]
296  +NF_N_Q_Q3_2D_EdgeWeight2[3]*PointValues[3]);
297 
298  if(Joint != -1)
299  {
300  // if(Cell->GetVertex(Joint) > Cell->GetVertex((Joint+1)%4))
301  // Functionals[1] = -Functionals[1];
302  // /*
303  neigh = Cell->GetJoint(Joint)->GetNeighbour(Cell);
304  if(neigh)
305  {
306  OwnNum = Coll->GetIndex(Cell);
307  NeighNum = Coll->GetIndex(neigh);
308  if(NeighNum < OwnNum)
309  Functionals[1] = -Functionals[1];
310  } // endif neigh
311  // */
312  }
313 }
314 
315 /*
316  TNodalFunctional2D(NodalFunctional2D id,
317  int n_allfunctionals, int n_edgefunctionals,
318  int n_pointsall, int n_pointsedge,
319  double *xi, double *eta, double *t,
320  DoubleFunctVect *evalall,
321  DoubleFunctVect *evaledge);
322 */
323 
324 TNodalFunctional2D *NF_N_Q_Q3_2D_Obj = new TNodalFunctional2D
325  (NF_N_Q_Q3_2D, 15, 3, 32, 4, NF_N_Q_Q3_2D_Xi, NF_N_Q_Q3_2D_Eta,
326  NF_N_Q_Q3_2D_T, NF_N_Q_Q3_2D_EvalAll, NF_N_Q_Q3_2D_EvalEdge);
store cells in an array, used by cell iterators
Definition: Collection.h:18
Definition: NodalFunctional2D.h:20
int GetIndex(TBaseCell *cell)
return Index of cell in Cells-array
Definition: Collection.C:115
TJoint * GetJoint(int J_i)
return the pointer to face with number i
Definition: BaseCell.h:175
TBaseCell * GetNeighbour(TBaseCell *Me) const
Definition: Joint.C:57
information for finite element data structure
Definition: BaseCell.h:25