source: Sophya/trunk/SophyaLib/NTools/nbinteg.h@ 4064

Last change on this file since 4064 was 220, checked in by ansari, 26 years ago

Creation module DPC/NTools Reza 09/04/99

File size: 5.7 KB
Line 
1/* Pour integration par la methode "higher order gaussian terms" */
2/* cmv 23/06/94 */
3
4#ifndef NBINTEG_H_SEEN
5#define NBINTEG_H_SEEN
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11/*=============================================================*/
12static int mIhoq2 = 2;
13static double Ihoq2X[2] =
14 { -0.288675135, 0.288675135 };
15static double Ihoq2W[2] =
16 { 0.500000000, 0.500000000 };
17/*=============================================================*/
18static int mIhoq3 = 3;
19static double Ihoq3X[3] =
20 { -0.387298335, 0.000000000, 0.387298335 };
21static double Ihoq3W[3] =
22 { 0.277777778, 0.444444444, 0.277777778 };
23/*=============================================================*/
24static int mIhoq4 = 4;
25static double Ihoq4X[4] =
26 { -0.430568156,-0.169990522, 0.169990522, 0.430568156 };
27static double Ihoq4W[4] =
28 { 0.173927423, 0.326072577, 0.326072577, 0.173927423 };
29/*=============================================================*/
30static int mIhoq5 = 5;
31static double Ihoq5X[5] =
32 { -0.453089923,-0.269234655, 0.000000000, 0.269234655,
33 0.453089923 };
34static double Ihoq5W[5] =
35 { 0.118463443, 0.239314335, 0.284444444, 0.239314335,
36 0.118463443 };
37/*=============================================================*/
38static int mIhoq6 = 6;
39static double Ihoq6X[6] =
40 { -0.466234757,-0.330604693,-0.119309593, 0.119309593,
41 0.330604693, 0.466234757 };
42static double Ihoq6W[6] =
43 { 0.085662246, 0.180380787, 0.233956967, 0.233956967,
44 0.180380787, 0.085662246 };
45/*=============================================================*/
46static int mIhoq7 = 7;
47static double Ihoq7X[7] =
48 { -0.474553956,-0.370765593,-0.202922576, 0.000000000,
49 0.202922576, 0.370765593, 0.474553956 };
50static double Ihoq7W[7] =
51 { 0.064742483, 0.139852696, 0.190915025, 0.208979592,
52 0.190915025, 0.139852696, 0.064742483 };
53/*=============================================================*/
54static int mIhoq8 = 8;
55static double Ihoq8X[8] =
56 { -0.480144928,-0.398333239,-0.262766205,-0.091717321,
57 0.091717321, 0.262766205, 0.398333239, 0.480144928 };
58static double Ihoq8W[8] =
59 { 0.050614268, 0.111190517, 0.156853323, 0.181341892,
60 0.181341892, 0.156853323, 0.111190517, 0.050614268 };
61/*=============================================================*/
62static int mIhoq9 = 9;
63static double Ihoq9X[9] =
64 { -0.484080120,-0.418015554,-0.306685716,-0.162126712,
65 0.000000000, 0.162126712, 0.306685716, 0.418015554,
66 0.484080120 };
67static double Ihoq9W[9] =
68 { 0.040637194, 0.090324080, 0.130305348, 0.156173539,
69 0.165119678, 0.156173539, 0.130305348, 0.090324080,
70 0.040637194 };
71/*=============================================================*/
72static int mIhoq10 = 10;
73static double Ihoq10X[10] =
74 { -0.486953264,-0.432531683,-0.339704784,-0.216697697,
75 -0.074437169, 0.074437169, 0.216697697, 0.339704784,
76 0.432531683, 0.486953264 };
77static double Ihoq10W[10] =
78 { 0.033335672, 0.074725675, 0.109543181, 0.134633360,
79 0.147762112, 0.147762112, 0.134633360, 0.109543181,
80 0.074725675, 0.033335672 };
81/*=============================================================*/
82static int mIhoq16 = 16;
83static double Ihoq16X[16] =
84 { -0.494700467,-0.472287512,-0.432815601,-0.377702204,
85 -0.308938122,-0.229008389,-0.140801775,-0.047506255,
86 0.047506255, 0.140801775, 0.229008389, 0.308938122,
87 0.377702204, 0.432815601, 0.472287512, 0.494700467 };
88static double Ihoq16W[16] =
89 { 0.013576230, 0.031126762, 0.047579256, 0.062314486,
90 0.074797994, 0.084578260, 0.091301708, 0.094725305,
91 0.094725305, 0.091301708, 0.084578260, 0.074797994,
92 0.062314486, 0.047579256, 0.031126762, 0.013576230 };
93/*=============================================================*/
94
95
96/* Integration 2D domaine carre */
97/* Selon Abramowitz p892-893 formule 25.462, residu ordre 0.5**6 */
98/* 0.387298=0.5*sqrt(3/5) 0.197531=16/81 0.123457=10/81 0.077160=25/324 */
99/* */
100#if defined(SIMPSON9)
101 static int nd2d = 9;
102 static float dx2d[9] = { 0.000000 , 0.000000 , 0.000000
103 ,-0.387298 , 0.387298 , -0.387298
104 , 0.387298 , -0.387298 , 0.387298 };
105 static float dy2d[9] = { 0.000000 , -0.387298 , 0.387298
106 , 0.000000 , 0.000000 , -0.387298
107 , 0.387298 , 0.387298 , -0.387298 };
108 static float w2d[9] = { 0.197531 , 0.123457 , 0.123457
109 , 0.123457 , 0.123457 , 0.077157
110 , 0.0771605, 0.0771605, 0.0771605};
111#elif defined(SIMPSON4)
112 static int nd2d = 4;
113 static float dx2d[4] = { 0.288675, 0.288675,-0.288675,-0.288675 };
114 static float dy2d[4] = { 0.288675,-0.288675, 0.288675,-0.288675 };
115 static float w2d[4] = { 0.250000, 0.250000, 0.250000, 0.250000 };
116#elif defined(INTEG5)
117 static int nd2d = 5;
118 static float dx2d[5] = { 0. , -0.3, -0.3, 0.3, 0.3 };
119 static float dy2d[5] = { 0. , -0.3, 0.3, -0.3, 0.3 };
120 static float w2d[5] = { 0.2, 0.2, 0.2, 0.2, 0.2 };
121#elif defined(NOINTEG)
122 static int nd2d = 1;
123 static float dx2d[1] = { 0. };
124 static float dy2d[1] = { 0. };
125 static float w2d[1] = { 1. };
126#else
127 static int nd2d = 0;
128 static float dx2d[1] = { 999999. };
129 static float dy2d[1] = { 999999. };
130 static float w2d[1] = { 0. };
131#endif
132
133
134/* Coeff pour le calcul du volume de f(x,y,z) dans des cubes 3D */
135static int nd3d = 6;
136static float dx3d[6] = { 0.5, -0.5, 0.0, 0.0, 0.0, 0.0 };
137static float dy3d[6] = { 0.0, 0.0, 0.5, -0.5, 0.0, 0.0 };
138static float dz3d[6] = { 0.0, 0.0, 0.0, 0.0, 0.5, -0.5 };
139static float w3d[6] = { 0.166667, 0.166667, 0.166667,
140 0.166667, 0.166667, 0.166667 };
141#ifdef __cplusplus
142}
143#endif
144
145#endif
146
Note: See TracBrowser for help on using the repository browser.