ParMooN
 All Classes Functions Variables Friends Pages
TNSE2D_FixPo.h
1 // ======================================================================
2 // @(#)TNSE2D_FixPo.h 1.2 05/05/00
3 //
4 // common declaration for all time dependent Navier-Stokes problems
5 // ======================================================================
6 
7 #ifndef __TNSE2D_FIXPO__
8 #define __TNSE2D_FIXPO__
9 
10 // ======================================================================
11 // declaration for all Navier-Stokes problems of type 1
12 // one A block,
13 // M block from time discretization
14 // B1, B2 (divergence blocks)
15 // ======================================================================
16 
17 int TimeNSType1N_Terms = 4;
18 MultiIndex2D TimeNSType1Derivatives[4] = { D10, D01, D00, D00 };
19 int TimeNSType1SpaceNumbers[4] = { 0, 0, 0, 1 };
20 int TimeNSType1N_Matrices = 4;
21 int TimeNSType1RowSpace[4] = { 0, 0, 1, 1 };
22 int TimeNSType1ColumnSpace[4] = { 0, 0, 0, 0 };
23 int TimeNSType1N_Rhs = 2;
24 int TimeNSType1RhsSpace[2] = { 0, 0 };
25 
26 // ======================================================================
27 // Type 1, Standard Galerkin
28 // ======================================================================
29 void TimeNSType1Galerkin(double Mult, double *coeff,
30  double *param, double hK,
31  double **OrigValues, int *N_BaseFuncts,
32  double ***LocMatrices, double **LocRhs);
33 
34 // ======================================================================
35 // for Type 1 is no SDFEM available
36 // ======================================================================
37 
38 // ======================================================================
39 // Type 1, for upwind (only laplacian in A block)
40 // ======================================================================
41 void TimeNSType1Upwind(double Mult, double *coeff,
42  double *param, double hK,
43  double **OrigValues, int *N_BaseFuncts,
44  double ***LocMatrices, double **LocRhs);
45 
46 // ======================================================================
47 // Type 1, Layton 96
48 // ======================================================================
49 void TimeNSType1Layton96(double Mult, double *coeff,
50  double *param, double hK,
51  double **OrigValues, int *N_BaseFuncts,
52  double ***LocMatrices, double **LocRhs);
53 
54 // ======================================================================
55 // Type 1, Smagorinsky
56 // ======================================================================
57 void TimeNSType1Smagorinsky(double Mult, double *coeff,
58  double *param, double hK,
59  double **OrigValues, int *N_BaseFuncts,
60  double ***LocMatrices, double **LocRhs);
61 
62 // ======================================================================
63 // Type 1, Coletti
64 // ======================================================================
65 void TimeNSType1Coletti(double Mult, double *coeff,
66  double *param, double hK,
67  double **OrigValues, int *N_BaseFuncts,
68  double ***LocMatrices, double **LocRhs);
69 
70 // ======================================================================
71 // Type 1, GL00Convolution
72 // ======================================================================
73 void TimeNSType1GL00Convolution(double Mult, double *coeff,
74  double *param, double hK,
75  double **OrigValues, int *N_BaseFuncts,
76  double ***LocMatrices, double **LocRhs);
77 
78 // ======================================================================
79 // Type 1, GL00AuxProblem
80 // ======================================================================
81 int TimeNSType1GL00AuxProblemN_Matrices = 5;
82 int TimeNSType1GL00AuxProblemRowSpace[5] = { 0, 0, 2, 1, 1 };
83 int TimeNSType1GL00AuxProblemColumnSpace[5] = { 0, 0, 2, 0, 0 };
84 
85 void TimeNSType1GL00AuxProblem(double Mult, double *coeff,
86  double *param, double hK,
87  double **OrigValues, int *N_BaseFuncts,
88  double ***LocMatrices, double **LocRhs);
89 
90 // ======================================================================
91 // Type 1, group fem
92 // ======================================================================
93 void TimeNSType1GroupFEM(double Mult, double *coeff, double *param, double hK,
94  double **OrigValues, int *N_BaseFuncts,
95  double ***LocMatrices, double **LocRhs);
96 
97 
98 // ======================================================================
99 // declaration for all Navier-Stokes problems of type 2
100 // one A block,
101 // M block from time discretization
102 // B1, B2 (divergence blocks),
103 // B1T, B2T (gradient blocks)
104 // ======================================================================
105 
106 int TimeNSType2N_Terms = 4;
107 MultiIndex2D TimeNSType2Derivatives[4] = { D10, D01, D00, D00 };
108 int TimeNSType2SpaceNumbers[4] = { 0, 0, 0, 1 };
109 int TimeNSType2N_Matrices = 6;
110 int TimeNSType2RowSpace[6] = { 0, 0, 1, 1, 0, 0 };
111 int TimeNSType2ColumnSpace[6] = { 0, 0, 0, 0, 1, 1 };
112 int TimeNSType2N_Rhs = 2;
113 int TimeNSType2RhsSpace[2] = { 0, 0 };
114 
115 // ======================================================================
116 // Type 2, Standard Galerkin
117 // ======================================================================
118 void TimeNSType2Galerkin(double Mult, double *coeff,
119  double *param, double hK,
120  double **OrigValues, int *N_BaseFuncts,
121  double ***LocMatrices, double **LocRhs);
122 
123 // ======================================================================
124 // declaration for all Navier-Stokes problems of type 2 SUPG
125 // one A block,
126 // M block from time discretization
127 // K block from supg discretization
128 // B1, B2 (divergence blocks),
129 // B1T, B2T (gradient blocks)
130 // ======================================================================
131 int TimeNSType2N_TermsSUPG = 8;
132 MultiIndex2D TimeNSType2DerivativesSUPG[8] = { D10, D01, D00, D00 };
133 int TimeNSType2SpaceNumbersSUPG[8] = { 0, 0, 0, 1 };
134 int TimeNSType2N_MatricesSUPG = 7;
135 int TimeNSType2RowSpaceSUPG[7] = { 0, 0, 1, 1, 0, 0 };
136 int TimeNSType2ColumnSpaceSUPG[7] = { 0, 0, 0, 0, 1, 1 };
137 int TimeNSType2N_RhsSUPG = 2;
138 int TimeNSType2RhsSpaceSUPG[2] = { 0, 0 };
139 
140 // ======================================================================
141 // Type 2, Standard SUPG
142 // ======================================================================
143 void TimeNSType2SUPG(double Mult, double *coeff, double *param, double hK,
144  double **OrigValues, int *N_BaseFuncts,
145  double ***LocMatrices, double **LocRhs);
146 // ======================================================================
147 // declaration for all Navier-Stokes problems of type 2
148 // one A block, one K block from time discretization
149 // B1T, B2T (gradient blocks)
150 // WITHOUT right hand sides
151 // ======================================================================
152 int TimeNSType2NLN_TermsSUPG = 8;
153 MultiIndex2D TimeNSType2NLDerivativesSUPG[8] = { D10, D01, D00 };
154 int TimeNSType2NLSpaceNumbersSUPG[8] = { 0, 0, 0 };
155 int TimeNSType2NLN_MatricesSUPG = 4;
156 int TimeNSType2NLRowSpaceSUPG[4] = { 0 };
157 int TimeNSType2NLColumnSpaceSUPG[4] = { 0 };
158 int TimeNSType2NLN_RhsSUPG = 2;
159 int TimeNSType2NLRhsSpaceSUPG[2] = {0, 0};
160 // ======================================================================
161 // Type 2, Standard SUPG
162 // ======================================================================
163 void TimeNSType2NLSUPG(double Mult, double *coeff, double *param, double hK,
164  double **OrigValues, int *N_BaseFuncts,
165  double ***LocMatrices, double **LocRhs);
166 // ======================================================================
167 
168 
169 // ======================================================================
170 // Type 2, Upwind (only Laplacian in A block)
171 // ======================================================================
172 void TimeNSType2Upwind(double Mult, double *coeff,
173  double *param, double hK,
174  double **OrigValues, int *N_BaseFuncts,
175  double ***LocMatrices, double **LocRhs);
176 
177 // ======================================================================
178 // Type 2, Layton96
179 // ======================================================================
180 void TimeNSType2Layton96(double Mult, double *coeff,
181  double *param, double hK,
182  double **OrigValues, int *N_BaseFuncts,
183  double ***LocMatrices, double **LocRhs);
184 
185 // ======================================================================
186 // Type 2, Smagorinsky
187 // ======================================================================
188 void TimeNSType2Smagorinsky(double Mult, double *coeff,
189  double *param, double hK,
190  double **OrigValues, int *N_BaseFuncts,
191  double ***LocMatrices, double **LocRhs);
192 
193 // ======================================================================
194 // Type 2, Coletti
195 // ======================================================================
196 void TimeNSType2Coletti(double Mult, double *coeff,
197  double *param, double hK,
198  double **OrigValues, int *N_BaseFuncts,
199  double ***LocMatrices, double **LocRhs);
200 
201 // ======================================================================
202 // Type 2, GL00Convolution
203 // ======================================================================
204 void TimeNSType2GL00Convolution(double Mult, double *coeff,
205  double *param, double hK,
206  double **OrigValues, int *N_BaseFuncts,
207  double ***LocMatrices, double **LocRhs);
208 
209 
210 // ======================================================================
211 // Type 2, GL00AuxProblem
212 // ======================================================================
213 int TimeNSType2GL00AuxProblemN_Matrices = 7;
214 int TimeNSType2GL00AuxProblemRowSpace[7] = { 0, 0, 2, 1, 1, 0, 0 };
215 int TimeNSType2GL00AuxProblemColumnSpace[7] = { 0, 0, 2, 0, 0, 1, 1 };
216 
217 void TimeNSType2GL00AuxProblem(double Mult, double *coeff,
218  double *param, double hK,
219  double **OrigValues, int *N_BaseFuncts,
220  double ***LocMatrices, double **LocRhs);
221 
222 // ======================================================================
223 // declaration for all Navier-Stokes problems of type 3
224 // all four A blocks,
225 // B1, B2 (divergence blocks),
226 // ======================================================================
227 
228 int TimeNSType3N_Terms = 4;
229 MultiIndex2D TimeNSType3Derivatives[4] = { D10, D01, D00, D00 };
230 int TimeNSType3SpaceNumbers[4] = { 0, 0, 0, 1 };
231 int TimeNSType3N_Matrices = 8;
232 int TimeNSType3RowSpace[8] = { 0, 0, 0, 0, 0, 0, 1, 1 };
233 int TimeNSType3ColumnSpace[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
234 int TimeNSType3N_Rhs = 2;
235 int TimeNSType3RhsSpace[2] = { 0, 0 };
236 
237 // ======================================================================
238 // Type 3, Standard Galerkin, (grad u, grad v)
239 // ======================================================================
240 void TimeNSType3Galerkin(double Mult, double *coeff,
241  double *param, double hK,
242  double **OrigValues, int *N_BaseFuncts,
243  double ***LocMatrices, double **LocRhs);
244 
245 // ======================================================================
246 // Type 3, Standard Galerkin, D(u):D(v)
247 // ======================================================================
248 void TimeNSType3GalerkinDD(double Mult, double *coeff,
249  double *param, double hK,
250  double **OrigValues, int *N_BaseFuncts,
251  double ***LocMatrices, double **LocRhs);
252 
253 // ======================================================================
254 // for Type 3 is SDFEM not available
255 // ======================================================================
256 
257 // ======================================================================
258 // Type 3, Upwind (no convection term), (grad u, grad v)
259 // ======================================================================
260 void TimeNSType3Upwind(double Mult, double *coeff,
261  double *param, double hK,
262  double **OrigValues, int *N_BaseFuncts,
263  double ***LocMatrices, double **LocRhs);
264 
265 // ======================================================================
266 // Type 3, Upwind (no convection term), D(u):D(v)
267 // ======================================================================
268 void TimeNSType3UpwindDD(double Mult, double *coeff,
269  double *param, double hK,
270  double **OrigValues, int *N_BaseFuncts,
271  double ***LocMatrices, double **LocRhs);
272 
273 // ======================================================================
274 // Type 3, Standard Layton96, (grad u, grad v)
275 // ======================================================================
276 void TimeNSType3Layton96(double Mult, double *coeff,
277  double *param, double hK,
278  double **OrigValues, int *N_BaseFuncts,
279  double ***LocMatrices, double **LocRhs);
280 
281 // ======================================================================
282 // Type 3, Standard Layton96, D(u):D(v)
283 // ======================================================================
284 void TimeNSType3Layton96DD(double Mult, double *coeff,
285  double *param, double hK,
286  double **OrigValues, int *N_BaseFuncts,
287  double ***LocMatrices, double **LocRhs);
288 
289 // ======================================================================
290 // Type 3, Standard Smagorinsky, (grad u, grad v)
291 // ======================================================================
292 void TimeNSType3Smagorinsky(double Mult, double *coeff,
293  double *param, double hK,
294  double **OrigValues, int *N_BaseFuncts,
295  double ***LocMatrices, double **LocRhs);
296 
297 // ======================================================================
298 // Type 3, Standard Smagorinsky, D(u):D(v)
299 // ======================================================================
300 void TimeNSType3SmagorinskyDD(double Mult, double *coeff,
301  double *param, double hK,
302  double **OrigValues, int *N_BaseFuncts,
303  double ***LocMatrices, double **LocRhs);
304 
305 // ======================================================================
306 // Type 3, Coletti, (grad u, grad v)
307 // ======================================================================
308 void TimeNSType3Coletti(double Mult, double *coeff,
309  double *param, double hK,
310  double **OrigValues, int *N_BaseFuncts,
311  double ***LocMatrices, double **LocRhs);
312 
313 // ======================================================================
314 // Type 3, Coletti, D(u):D(v)
315 // ======================================================================
316 void TimeNSType3ColettiDD(double Mult, double *coeff,
317  double *param, double hK,
318  double **OrigValues, int *N_BaseFuncts,
319  double ***LocMatrices, double **LocRhs);
320 
321 // ======================================================================
322 // Type 3, GL00Convolution, (grad u, grad v)
323 // ======================================================================
324 void TimeNSType3GL00Convolution(double Mult, double *coeff,
325  double *param, double hK,
326  double **OrigValues, int *N_BaseFuncts,
327  double ***LocMatrices, double **LocRhs);
328 
329 // ======================================================================
330 // Type 3, GL00Convolution, D(u):D(v)
331 // ======================================================================
332 void TimeNSType3GL00ConvolutionDD(double Mult, double *coeff,
333  double *param, double hK,
334  double **OrigValues, int *N_BaseFuncts,
335  double ***LocMatrices, double **LocRhs);
336 
337 // ======================================================================
338 // Type 3, GL00AuxProblem, (grad u, grad v)
339 // ======================================================================
340 int TimeNSType3GL00AuxProblemN_Matrices = 9;
341 int TimeNSType3GL00AuxProblemRowSpace[9] = { 0, 0, 0, 0, 0, 0, 2, 1, 1 };
342 int TimeNSType3GL00AuxProblemColumnSpace[9] = { 0, 0, 0, 0, 0, 0, 2, 0, 0 };
343 
344 void TimeNSType3GL00AuxProblem(double Mult, double *coeff,
345  double *param, double hK,
346  double **OrigValues, int *N_BaseFuncts,
347  double ***LocMatrices, double **LocRhs);
348 
349 // ======================================================================
350 // Type 3, GL00AuxProblem, D(u):D(v)
351 // ======================================================================
352 void TimeNSType3GL00AuxProblemDD(double Mult, double *coeff,
353  double *param, double hK,
354  double **OrigValues, int *N_BaseFuncts,
355  double ***LocMatrices, double **LocRhs);
356 
357 
358 // ======================================================================
359 // Type 3, VMSProjection, D(u):D(v)
360 // ======================================================================
361 int TimeNSType3VMSProjectionN_Terms = 5;
362 MultiIndex2D TimeNSType3VMSProjectionDerivatives[5] = { D10, D01, D00, D00, D00 };
363 int TimeNSType3VMSProjectionSpaceNumbers[5] = { 0, 0, 0, 1, 3 };
364 int TimeNSType3VMSProjectionN_Matrices = 13;
365 int TimeNSType3VMSProjectionRowSpace[13] = { 0, 0, 0, 0, 0, 0,
366  3, 1, 1, 0, 0, 3, 3};
367 int TimeNSType3VMSProjectionColumnSpace[13] = { 0, 0, 0, 0, 0, 0,
368  3, 0, 0, 3, 3, 0, 0};
369 
370 void TimeNSType3VMSProjectionDD(double Mult, double *coeff,
371  double *param, double hK,
372  double **OrigValues, int *N_BaseFuncts,
373  double ***LocMatrices, double **LocRhs);
374 
375 
376 // ======================================================================
377 // declaration for all Navier-Stokes problems of type 4
378 // all four A blocks,
379 // B1, B2 (divergence blocks),
380 // B1T, B2T (gradient blocks)
381 // ======================================================================
382 
383 int TimeNSType4N_Terms = 4;
384 MultiIndex2D TimeNSType4Derivatives[4] = { D10, D01, D00, D00 };
385 int TimeNSType4SpaceNumbers[4] = { 0, 0, 0, 1 };
386 int TimeNSType4N_Matrices = 10;
387 int TimeNSType4RowSpace[10] = { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 };
388 int TimeNSType4ColumnSpace[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 };
389 int TimeNSType4N_Rhs = 2;
390 int TimeNSType4RhsSpace[2] = { 0, 0 };
391 
392 // if convolution of velocity should be computed
393 //int TimeNSType4N_MatricesConvU = 11;
394 //int TimeNSType4RowSpaceConvU[11] = { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 };
395 //int TimeNSType4ColumnSpaceConvU[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 };
396 
397 // ======================================================================
398 // Type 4, Standard Galerkin, (grad u, grad v)
399 // ======================================================================
400 void TimeNSType4Galerkin(double Mult, double *coeff,
401  double *param, double hK,
402  double **OrigValues, int *N_BaseFuncts,
403  double ***LocMatrices, double **LocRhs);
404 
405 // ======================================================================
406 // Type 4, Standard Galerkin, D(u):D(v)
407 // ======================================================================
408 void TimeNSType4GalerkinDD(double Mult, double *coeff,
409  double *param, double hK,
410  double **OrigValues, int *N_BaseFuncts,
411  double ***LocMatrices, double **LocRhs);
412 
413 // ======================================================================
414 // for Type 4 SDFEM is not available
415 // ======================================================================
416 
417 // ======================================================================
418 // Type 4, Upwind (no convection terms), (grad u, grad v)
419 // ======================================================================
420 void TimeNSType4Upwind(double Mult, double *coeff,
421  double *param, double hK,
422  double **OrigValues, int *N_BaseFuncts,
423  double ***LocMatrices, double **LocRhs);
424 
425 // ======================================================================
426 // Type 4, Upwind (no convection terms), D(u):D(v)
427 // ======================================================================
428 void TimeNSType4UpwindDD(double Mult, double *coeff,
429  double *param, double hK,
430  double **OrigValues, int *N_BaseFuncts,
431  double ***LocMatrices, double **LocRhs);
432 
433 // ======================================================================
434 // Type 4, Layton96, (grad u, grad v)
435 // ======================================================================
436 void TimeNSType4Layton96(double Mult, double *coeff,
437  double *param, double hK,
438  double **OrigValues, int *N_BaseFuncts,
439  double ***LocMatrices, double **LocRhs);
440 
441 // ======================================================================
442 // Type 4, Layton96, D(u):D(v)
443 // ======================================================================
444 void TimeNSType4Layton96DD(double Mult, double *coeff,
445  double *param, double hK,
446  double **OrigValues, int *N_BaseFuncts,
447  double ***LocMatrices, double **LocRhs);
448 
449 // ======================================================================
450 // Type 4, Smagorinsky, (grad u, grad v)
451 // ======================================================================
452 void TimeNSType4Smagorinsky(double Mult, double *coeff,
453  double *param, double hK,
454  double **OrigValues, int *N_BaseFuncts,
455  double ***LocMatrices, double **LocRhs);
456 
457 // ======================================================================
458 // Type 4, Smagorinsky, D(u):D(v)
459 // ======================================================================
460 void TimeNSType4SmagorinskyDD(double Mult, double *coeff,
461  double *param, double hK,
462  double **OrigValues, int *N_BaseFuncts,
463  double ***LocMatrices, double **LocRhs);
464 
465 // ======================================================================
466 // Type 4, Coletti, (grad u, grad v)
467 // ======================================================================
468 void TimeNSType4Coletti(double Mult, double *coeff,
469  double *param, double hK,
470  double **OrigValues, int *N_BaseFuncts,
471  double ***LocMatrices, double **LocRhs);
472 
473 // ======================================================================
474 // Type 4, Coletti, D(u):D(v)
475 // ======================================================================
476 void TimeNSType4ColettiDD(double Mult, double *coeff,
477  double *param, double hK,
478  double **OrigValues, int *N_BaseFuncts,
479  double ***LocMatrices, double **LocRhs);
480 
481 // ======================================================================
482 // Type 4, GL00Convolution, (grad u, grad v)
483 // ======================================================================
484 void TimeNSType4GL00Convolution(double Mult, double *coeff,
485  double *param, double hK,
486  double **OrigValues, int *N_BaseFuncts,
487  double ***LocMatrices, double **LocRhs);
488 
489 // ======================================================================
490 // Type 4, GL00Convolution, D(u):D(v)
491 // ======================================================================
492 void TimeNSType4GL00ConvolutionDD(double Mult, double *coeff,
493  double *param, double hK,
494  double **OrigValues, int *N_BaseFuncts,
495  double ***LocMatrices, double **LocRhs);
496 
497 // ======================================================================
498 // Type 4, GL00AuxProblem, (grad u, grad v)
499 // ======================================================================
500 int TimeNSType4GL00AuxProblemN_Matrices = 11;
501 int TimeNSType4GL00AuxProblemRowSpace[11] =
502  { 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0 };
503 int TimeNSType4GL00AuxProblemColumnSpace[11] =
504  { 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1 };
505 
506 void TimeNSType4GL00AuxProblem(double Mult, double *coeff,
507  double *param, double hK,
508  double **OrigValues, int *N_BaseFuncts,
509  double ***LocMatrices, double **LocRhs);
510 
511 // ======================================================================
512 // Type 4, GL00AuxProblem, D(u):D(v)
513 // ======================================================================
514 void TimeNSType4GL00AuxProblemDD(double Mult, double *coeff,
515  double *param, double hK,
516  double **OrigValues, int *N_BaseFuncts,
517  double ***LocMatrices, double **LocRhs);
518 
519 
520 // ======================================================================
521 // Type 4, VMSProjection, D(u):D(v)
522 // ======================================================================
523 int TimeNSType4VMSProjectionN_Terms = 5;
524 MultiIndex2D TimeNSType4VMSProjectionDerivatives[5] = { D10, D01, D00, D00, D00 };
525 int TimeNSType4VMSProjectionSpaceNumbers[5] = { 0, 0, 0, 1, 3 };
526 int TimeNSType4VMSProjectionN_Matrices = 15;
527 int TimeNSType4VMSProjectionRowSpace[15] = { 0, 0, 0, 0, 0, 0,
528  3, 1, 1, 0, 0, 0, 0, 3, 3};
529 int TimeNSType4VMSProjectionColumnSpace[15] = { 0, 0, 0, 0, 0, 0,
530  3, 0, 0, 1, 1, 3, 3, 0, 0};
531 
532 void TimeNSType4VMSProjectionDD(double Mult, double *coeff,
533  double *param, double hK,
534  double **OrigValues, int *N_BaseFuncts,
535  double ***LocMatrices, double **LocRhs);
536 
537 // ======================================================================
538 // Assembling routine for all nonlinear matrices
539 // ======================================================================
540 
541 // ======================================================================
542 // declaration for all Navier-Stokes problems of type 1
543 // one nonlinear A block
544 // WITHOUT right hand sides
545 // ======================================================================
546 
547 int TimeNSType1NLN_Terms = 3;
548 MultiIndex2D TimeNSType1NLDerivatives[3] = { D10, D01, D00 };
549 int TimeNSType1NLSpaceNumbers[3] = { 0, 0, 0 };
550 int TimeNSType1NLN_Matrices = 1;
551 int TimeNSType1NLRowSpace[1] = { 0 };
552 int TimeNSType1NLColumnSpace[1] = { 0 };
553 int TimeNSType1NLN_Rhs = 0;
554 int *TimeNSType1NLRhsSpace = NULL;
555 
556 // ======================================================================
557 // declaration for all Navier-Stokes problems of type 2
558 // one A block,
559 // WITHOUT B1T, B2T (gradient blocks)
560 // WITHOUT right hand sides
561 // ======================================================================
562 
563 int TimeNSType2NLN_Terms = 3;
564 MultiIndex2D TimeNSType2NLDerivatives[3] = { D10, D01, D00 };
565 int TimeNSType2NLSpaceNumbers[3] = { 0, 0, 0 };
566 int TimeNSType2NLN_Matrices = 1;
567 int TimeNSType2NLRowSpace[1] = { 0 };
568 int TimeNSType2NLColumnSpace[1] = { 0 };
569 int TimeNSType2NLN_Rhs = 0;
570 int *TimeNSType2NLRhsSpace = NULL;
571 
572 // ======================================================================
573 // Type 1, Standard Galerkin, only nonlinear part
574 // Type 2, Standard Galerkin, only nonlinear part
575 // Type 1, Coletti, only nonlinear part
576 // Type 2, Coletti, only nonlinear part
577 // Type 1, GL00Convolution, only nonlinear part
578 // Type 2, GL00Convolution, only nonlinear part
579 // ======================================================================
580 void TimeNSType1_2NLGalerkin(double Mult, double *coeff,
581  double *param, double hK,
582  double **OrigValues, int *N_BaseFuncts,
583  double ***LocMatrices, double **LocRhs);
584 
585 // ======================================================================
586 // Type 1, for upwind (only laplacian in A block)
587 // Type 2, for upwind (only laplacian in A block)
588 // ======================================================================
589 void TimeNSType1_2NLUpwind(double Mult, double *coeff,
590  double *param, double hK,
591  double **OrigValues, int *N_BaseFuncts,
592  double ***LocMatrices, double **LocRhs);
593 
594 // ======================================================================
595 // Type 1, Layto96, only nonlinear part
596 // Type 2, Layto96, only nonlinear part
597 // ======================================================================
598 void TimeNSType1_2NLLayton96(double Mult, double *coeff,
599  double *param, double hK,
600  double **OrigValues, int *N_BaseFuncts,
601  double ***LocMatrices, double **LocRhs);
602 
603 // ======================================================================
604 // Type 1, Smagorinsky, only nonlinear part
605 // Type 2, Smagorinsky, only nonlinear part
606 // ======================================================================
607 void TimeNSType1_2NLSmagorinsky(double Mult, double *coeff,
608  double *param, double hK,
609  double **OrigValues, int *N_BaseFuncts,
610  double ***LocMatrices, double **LocRhs);
611 
612 // ======================================================================
613 // declaration for all Navier-Stokes problems of type 3
614 // main diagonal blocks A11, A22
615 // WITHOUT right hand sides
616 // ======================================================================
617 
618 int TimeNSType3NLN_Terms = 3;
619 MultiIndex2D TimeNSType3NLDerivatives[3] = { D10, D01, D00 };
620 int TimeNSType3NLSpaceNumbers[3] = { 0, 0, 0 };
621 int TimeNSType3NLN_Matrices = 2;
622 int TimeNSType3NLRowSpace[2] = { 0, 0 };
623 int TimeNSType3NLColumnSpace[2] = { 0, 0 };
624 int TimeNSType3NLN_Rhs = 0;
625 int *TimeNSType3NLRhsSpace = NULL;
626 
627 // ======================================================================
628 // declaration for all Navier-Stokes problems of type 4
629 // main diagonal blocks A11, A22
630 // WITHOUT B1T, B2T (gradient blocks)
631 // WITHOUT right hand sides
632 // ======================================================================
633 
634 int TimeNSType4NLN_Terms = 3;
635 MultiIndex2D TimeNSType4NLDerivatives[3] = { D10, D01, D00 };
636 int TimeNSType4NLSpaceNumbers[3] = { 0, 0, 0 };
637 int TimeNSType4NLN_Matrices = 2;
638 int TimeNSType4NLRowSpace[2] = { 0, 0 };
639 int TimeNSType4NLColumnSpace[2] = { 0, 0 };
640 int TimeNSType4NLN_Rhs = 0;
641 int *TimeNSType4NLRhsSpace = NULL;
642 
643 // ======================================================================
644 // Type 3, Standard Galerkin, (grad u, grad v), only nonlinear part
645 // Type 4, Standard Galerkin, (grad u, grad v), only nonlinear part
646 // Type 3, Coletti, (grad u, grad v), only nonlinear part
647 // Type 4, Coletti, (grad u, grad v), only nonlinear part
648 // Type 3, GL00Convolution, (grad u, grad v), only nonlinear part
649 // Type 4, GL00Convolution, (grad u, grad v), only nonlinear part
650 // ======================================================================
651 void TimeNSType3_4NLGalerkin(double Mult, double *coeff,
652  double *param, double hK,
653  double **OrigValues, int *N_BaseFuncts,
654  double ***LocMatrices, double **LocRhs);
655 
656 // ======================================================================
657 // Type 3, Standard Galerkin, D(u):D(v), only nonlinear diagonal blocks
658 // Type 4, Standard Galerkin, D(u):D(v), only nonlinear diagonal blocks
659 // Type 3, Coletti, D(u):D(v), only nonlinear diagonal blocks
660 // Type 4, Coletti, D(u):D(v), only nonlinear diagonal blocks
661 // Type 3, GL00Convolution, D(u):D(v), only nonlinear diagonal blocks
662 // Type 4, GL00Convolution, D(u):D(v), only nonlinear diagonal blocks
663 // ======================================================================
664 void TimeNSType3_4NLGalerkinDD(double Mult, double *coeff,
665  double *param, double hK,
666  double **OrigValues, int *N_BaseFuncts,
667  double ***LocMatrices, double **LocRhs);
668 
669 // ======================================================================
670 // Type 3, Upwind (no convection term), (grad u, grad v)
671 // Type 4, Upwind (no convection term), (grad u, grad v)
672 // ======================================================================
673 void TimeNSType3_4NLUpwind(double Mult, double *coeff,
674  double *param, double hK,
675  double **OrigValues, int *N_BaseFuncts,
676  double ***LocMatrices, double **LocRhs);
677 
678 // ======================================================================
679 // Type 3, Upwind (no convection term), D(u):D(v)
680 // Type 4, Upwind (no convection term), D(u):D(v)
681 // ======================================================================
682 void TimeNSType3_4NLUpwindDD(double Mult, double *coeff,
683  double *param, double hK,
684  double **OrigValues, int *N_BaseFuncts,
685  double ***LocMatrices, double **LocRhs);
686 
687 // ======================================================================
688 // Type 3, Standard Layton96, (grad u, grad v), only nonlinear part
689 // Type 4, Standard Layton96, (grad u, grad v), only nonlinear part
690 // ======================================================================
691 void TimeNSType3_4NLLayton96(double Mult, double *coeff,
692  double *param, double hK,
693  double **OrigValues, int *N_BaseFuncts,
694  double ***LocMatrices, double **LocRhs);
695 
696 // ======================================================================
697 // Type 3, Standard Layton96, D(u):D(v), only nonlinear diagonal blocks
698 // Type 4, Standard Layton96, D(u):D(v), only nonlinear diagonal blocks
699 // ======================================================================
700 void TimeNSType3_4NLLayton96DD(double Mult, double *coeff,
701  double *param, double hK,
702  double **OrigValues, int *N_BaseFuncts,
703  double ***LocMatrices, double **LocRhs);
704 
705 // ======================================================================
706 // Type 3, Standard Smagorinsky, (grad u, grad v), only nonlinear part
707 // Type 4, Standard Smagorinsky, (grad u, grad v), only nonlinear part
708 // ======================================================================
709 int TimeNSType3NLSmagorinskyN_Matrices = 4;
710 int TimeNSType3NLSmagorinskyRowSpace[4] = { 0, 0, 0, 0 };
711 int TimeNSType3NLSmagorinskyColumnSpace[4] = { 0, 0, 0, 0 };
712 
713 void TimeNSType3_4NLSmagorinsky(double Mult, double *coeff,
714  double *param, double hK,
715  double **OrigValues, int *N_BaseFuncts,
716  double ***LocMatrices, double **LocRhs);
717 
718 // ======================================================================
719 // Type 3, Standard Smagorinsky, D(u):D(v), only nonlinear diagonal blocks
720 // Type 4, Standard Smagorinsky, D(u):D(v), only nonlinear diagonal blocks
721 // ======================================================================
722 void TimeNSType3_4NLSmagorinskyDD(double Mult, double *coeff,
723  double *param, double hK,
724  double **OrigValues, int *N_BaseFuncts,
725  double ***LocMatrices, double **LocRhs);
726 
727 // ======================================================================
728 // Type 3, VMSProjection, D(u):D(v), only nonlinear diagonal blocks
729 // Type 4, VMSProjection, D(u):D(v), only nonlinear diagonal blocks
730 // ======================================================================
731 int TimeNSType3NLVMSProjectionN_Terms = 4;
732 MultiIndex2D TimeNSType3NLVMSProjectionDerivatives[4] = { D10, D01, D00, D00 };
733 int TimeNSType3NLVMSProjectionSpaceNumbers[4] = { 0, 0, 0, 3 };
734 int TimeNSType3NLVMSProjectionN_Matrices = 6;
735 int TimeNSType3NLVMSProjectionRowSpace[6] = { 0, 0, 0, 0, 0, 0};
736 int TimeNSType3NLVMSProjectionColumnSpace[6] = { 0, 0, 0, 0, 3, 3 };
737 
738 void TimeNSType3_4NLVMSProjectionDD(double Mult, double *coeff,
739  double *param, double hK,
740  double **OrigValues, int *N_BaseFuncts,
741  double ***LocMatrices, double **LocRhs);
742 
743 // ======================================================================
744 // Assembling routine for right-hand sides only
745 // ======================================================================
746 
747 // ======================================================================
748 // declaration for all Navier-Stokes problems
749 // ONLY right hand sides
750 // ======================================================================
751 
752 int TimeNSRHSN_Terms = 1;
753 MultiIndex2D TimeNSRHSDerivatives[1] = { D00 };
754 int TimeNSRHSSpaceNumbers[1] = { 0 };
755 int TimeNSRHSN_Matrices = 0;
756 int *TimeNSRHSRowSpace = NULL;
757 int *TimeNSRHSColumnSpace = NULL;
758 int TimeNSRHSN_Rhs = 2;
759 int TimeNSRHSRhsSpace[2] = { 0, 0 };
760 
761 // ======================================================================
762 // right-hand side ONLY
763 // ======================================================================
764 void TimeNSRHS(double Mult, double *coeff,
765  double *param, double hK,
766  double **OrigValues, int *N_BaseFuncts,
767  double ***LocMatrices, double **LocRhs);
768 //=======================================================================
769 //=======================================================================
770 int TimeNSRHSN_TermsSUPG = 3;
771 MultiIndex2D TimeNSRHSDerivativesSUPG[3] = { D10, D01, D00 };
772 int TimeNSRHSSpaceNumbersSUPG[3] = { 0, 0, 0 };
773 int TimeNSRHSN_MatricesSUPG = 0;
774 int *TimeNSRHSRowSpaceSUPG = NULL;
775 int *TimeNSRHSColumnSpaceSUPG = NULL;
776 int TimeNSRHSN_RhsSUPG = 4;
777 int TimeNSRHSRhsSpaceSUPG[4] = { 0, 0, 0, 0 };
778 
779 void TimeNSRHSSUPG(double Mult, double *coeff, double *param, double hK,
780  double **OrigValues, int *N_BaseFuncts,
781  double ***LocMatrices, double **LocRhs);
782 
783 
784 void TimeNSRHSAuxProblemU(double Mult, double *coeff,
785  double *param, double hK,
786  double **OrigValues, int *N_BaseFuncts,
787  double ***LocMatrices, double **LocRhs);
788 
789 int TimeNSRHSColN_Terms = 3;
790 MultiIndex2D TimeNSRHSColDerivatives[3] = { D10, D01, D00 };
791 int TimeNSRHSColSpaceNumbers[3] = { 0, 0, 0 };
792 int TimeNSRHSColN_Matrices = 0;
793 int *TimeNSRHSColRowSpace = NULL;
794 int *TimeNSRHSColColumnSpace = NULL;
795 int TimeNSRHSColN_Rhs = 2;
796 int TimeNSRHSColRhsSpace[2] = { 0, 0 };
797 
798 // ======================================================================
799 // right-hand side ONLY, Coletti model
800 // ======================================================================
801 void TimeNSRHSColetti(double Mult, double *coeff,
802  double *param, double hK,
803  double **OrigValues, int *N_BaseFuncts,
804  double ***LocMatrices, double **LocRhs);
805 
806 // ======================================================================
807 // right-hand side ONLY, Galdi-Layton model with convolution
808 // ======================================================================
809 void TimeNSRHSLESModel(double Mult, double *coeff,
810  double *param, double hK,
811  double **OrigValues, int *N_BaseFuncts,
812  double ***LocMatrices, double **LocRhs);
813 
814 
815 // ======================================================================
816 // right-hand side ONLY, Galdi-Layton model with auxiliary problem
817 // ======================================================================
818 
819 void TimeNSRHSGL00AuxProblemPaper2(double Mult, double *coeff,
820  double *param, double hK,
821  double **OrigValues, int *N_BaseFuncts,
822  double ***LocMatrices, double **LocRhs);
823 
824 // ======================================================================
825 // right-hand side for auxiliary problem
826 // ONLY, Galdi-Layton model with auxiliary problem
827 // ======================================================================
828 
829 int TimeNSGL00AuxProblemRHSN_Terms = 1;
830 MultiIndex2D TimeNSGL00AuxProblemRHSDerivatives[1] = { D00 };
831 int TimeNSGL00AuxProblemRHSSpaceNumbers[1] = { 0 };
832 int TimeNSGL00AuxProblemRHSN_Matrices = 0;
833 int *TimeNSGL00AuxProblemRHSRowSpace = NULL;
834 int *TimeNSGL00AuxProblemRHSColumnSpace = NULL;
835 int TimeNSGL00AuxProblemRHSN_Rhs = 3;
836 int TimeNSGL00AuxProblemRHSRhsSpace[3] = { 0, 0, 0 };
837 
838 void TimeNSGL00AuxProblemRHS(double Mult, double *coeff,
839  double *param, double hK,
840  double **OrigValues, int *N_BaseFuncts,
841  double ***LocMatrices, double **LocRhs);
842 
843 void TimeNSGL00AuxProblemRHSPaper2(double Mult, double *coeff,
844  double *param, double hK,
845  double **OrigValues, int *N_BaseFuncts,
846  double ***LocMatrices, double **LocRhs);
847 
848 // ======================================================================
849 // right-hand side ONLY, Smagorinsky Explicit
850 // ======================================================================
851 void TimeNSRHSSmagorinskyExplicit(double Mult, double *coeff,
852  double *param, double hK,
853  double **OrigValues, int *N_BaseFuncts,
854  double ***LocMatrices, double **LocRhs);
855 
856 
857 // ======================================================================
858 // Type 3, Standard Galerkin, D(u):D(v), only nonlinear diagonal blocks
859 // Type 4, Standard Galerkin, D(u):D(v), only nonlinear diagonal blocks
860 // + convection with higher order velocity
861 // ======================================================================
862 void TimeNSType3_4NLGalerkin_VMS_1_DD(double Mult, double *coeff,
863  double *param, double hK,
864  double **OrigValues, int *N_BaseFuncts,
865  double ***LocMatrices, double **LocRhs);
866 
867 // ======================================================================
868 // right-hand side for additional terms in rhs of small scale systems
869 // for VMS
870 // ======================================================================
871 void TimeNS_VMS_SmallRhs2D(double Mult, double *coeff,
872  double *param, double hK,
873  double **OrigValues, int *N_BaseFuncts,
874  double ***LocMatrices, double **LocRhs);
875 
876 // ======================================================================
877 // right-hand side for additional terms in rhs of large scale systems
878 // for VMS
879 // ======================================================================
880 void TimeNS_VMS_Large_0_Rhs2D(double Mult, double *coeff,
881  double *param, double hK,
882  double **OrigValues, int *N_BaseFuncts,
883  double ***LocMatrices, double **LocRhs);
884 
885 // ======================================================================
886 // right-hand side for additional terms in rhs of large scale systems
887 // for VMS
888 // ======================================================================
889 void TimeNS_VMS_Large_1_Rhs2D(double Mult, double *coeff,
890  double *param, double hK,
891  double **OrigValues, int *N_BaseFuncts,
892  double ***LocMatrices, double **LocRhs);
893 
894 // ======================================================================
895 // Assembling routine for matrices for auxiliary problems
896 // ======================================================================
897 
898 // ======================================================================
899 // declarations
900 // ======================================================================
901 /*
902 int TimeNSGL00AuxProblemN_Terms = 3;
903 MultiIndex2D TimeNSGL00AuxProblemDerivatives[3] = { D10, D01, D00 };
904 int TimeNSGL00AuxProblemSpaceNumbers[3] = { 0, 0, 0 };
905 int TimeNSGL00AuxProblemN_Matrices = 1;
906 int TimeNSGL00AuxProblemRowSpace[2] = { 0 };
907 int TimeNSGL00AuxProblemColumnSpace[2] = { 0 };
908 int TimeNSGL00AuxProblemN_Rhs = 0;
909 int *TimeNSGL00AuxProblemRhsSpace = NULL;
910 
911 void TimeNSAuxMatrixGL00AuxProblem(double Mult, double *coeff,
912  double *param, double hK,
913  double **OrigValues, int *N_BaseFuncts,
914  double ***LocMatrices, double **LocRhs);
915 */
916 // ======================================================================
917 // assemble matrix for auxiliary problem
918 // ======================================================================
919 
920 int MatrixAuxiliaryProblemN_Terms = 3;
921 MultiIndex2D MatrixAuxiliaryProblemDerivatives[3] = { D10, D01, D00};
922 int MatrixAuxiliaryProblemSpaceNumbers[3] = { 0, 0, 0};
923 int MatrixAuxiliaryProblemN_Matrices = 1;
924 int MatrixAuxiliaryProblemRowSpace[1] = { 0 };
925 int MatrixAuxiliaryProblemColumnSpace[1] = { 0 };
926 int MatrixAuxiliaryProblemN_Rhs = 0;
927 int *MatrixAuxiliaryProblemRhsSpace = NULL;
928 
929 void MatrixAuxiliaryProblem(double Mult, double *coeff,
930  double *param, double hK,
931  double **OrigValues, int *N_BaseFuncts,
932  double ***LocMatrices, double **LocRhs);
933 
934 
935 // ======================================================================
936 // declaration for VMS
937 // ONLY right hand sides
938 // ======================================================================
939 
940 static int TimeNS_ho_RHSN_Terms = 3;
941 static MultiIndex2D TimeNS_ho_RHSDerivatives[4] = { D10, D01, D00};
942 static int TimeNS_ho_RHSSpaceNumbers[1] = { 0 };
943 static int TimeNS_ho_RHSN_Matrices = 0;
944 static int *TimeNS_ho_RHSRowSpace = NULL;
945 static int *TimeNS_ho_RHSColumnSpace = NULL;
946 static int TimeNS_ho_RHSN_Rhs = 2;
947 static int TimeNS_ho_RHSRhsSpace[2] = { 0, 0 };
948 
949 
950 void TimeNSType1GalerkinRHS(double Mult, double *coeff,
951  double *param, double hK,
952  double **OrigValues, int *N_BaseFuncts,
953  double ***LocMatrices, double **LocRhs);
954 
955 void TimeNSType1GalerkinJ(double Mult, double *coeff,
956  double *param, double hK,
957  double **OrigValues, int *N_BaseFuncts,
958  double ***LocMatrices, double **LocRhs);
959 
960 void TimeNSType1GalerkinC(double Mult, double *coeff,
961  double *param, double hK,
962  double **OrigValues, int *N_BaseFuncts,
963  double ***LocMatrices, double **LocRhs);
964 
965 
966 void TimeNSType3GalerkinJ(double Mult, double *coeff,
967  double *param, double hK,
968  double **OrigValues, int *N_BaseFuncts,
969  double ***LocMatrices, double **LocRhs);
970 
971 // ======================================================================
972 // right-hand side ONLY, defect correction type 0, u2
973 // ======================================================================
974 void TimeNSRHSDefectCorrectionU2(double Mult, double *coeff,
975 double *param, double hK,
976 double **OrigValues, int *N_BaseFuncts,
977  double ***LocMatrices, double **LocRhs);
978 // ======================================================================
979 // right-hand side ONLY, defect correction type 1, u2
980 // ======================================================================
981 void TimeNSRHSDefectCorrectionU2_1(double Mult, double *coeff,
982 double *param, double hK,
983 double **OrigValues, int *N_BaseFuncts,
984  double ***LocMatrices, double **LocRhs);
985 
986 // ======================================================================
987 
988 void TimeNSType4GalerkinDD_Axial3D(double Mult, double *coeff,
989  double *param, double hK,
990  double **OrigValues, int *N_BaseFuncts,
991  double ***LocMatrices, double **LocRhs);
992 
993 void TimeNSType3_4NLGalerkinDD_Axial3D(double Mult, double *coeff,
994  double *param, double hK,
995  double **OrigValues, int *N_BaseFuncts,
996  double ***LocMatrices, double **LocRhs);
997 
998 void TimeNSType4GalerkinDD_2PhaseAxial3D(double Mult, double *coeff,
999  double *param, double hK,
1000  double **OrigValues, int *N_BaseFuncts,
1001  double ***LocMatrices, double **LocRhs);
1002 
1003 void TimeNSType3_4NLGalerkinDD_2PhaseAxial3D(double Mult, double *coeff,
1004  double *param, double hK,
1005  double **OrigValues, int *N_BaseFuncts,
1006  double ***LocMatrices, double **LocRhs);
1007 
1008 void GridAssemble4(double Mult, double *coeff,
1009  double *param, double hK,
1010  double **OrigValues, int *N_BaseFuncts,
1011  double ***LocMatrices, double **LocRhs);
1012 
1013 // ======================================================================
1014 
1015 #endif // __TNSE2D_FIXPO__