Overture  Version 25
xD.h
Go to the documentation of this file.
1 #ifndef X_D_H
2 #define X_D_H
3 
4 
5 //-----------------------------------------------------------------------------
6 // Define second order difference approximations:
7 // The include file cgux2a.h defines second order difference approximations
8 //
9 // Notes:
10 // For efficiency we define UR2, US2 and UT2 to be the arrays that we have precomputed
11 // the parametric derivatives in. (Otherwise the derivatives would get
12 // recomputed for all derivatives). UR2, US2 and UT2 are used in cgux2a.h
13 // to define UX2, UY2, UXX2, ...
14 //-----------------------------------------------------------------------------
15 #define U(I1,I2,I3,N) u(I1,I2,I3,N)
16 #define UR2(I1,I2,I3,N) ur(I1,I2,I3,N)
17 #define US2(I1,I2,I3,N) us(I1,I2,I3,N)
18 #define UT2(I1,I2,I3,N) ut(I1,I2,I3,N)
19 #include "cgux2a.h" // define 2nd order difference approximations
20 
21 //-----------------------------------------------------------------------------
22 // Define fourth order difference approximations:
23 // The include file cgux4a.h defines fourth order difference approximations
24 //
25 // Notes : see above
26 //----------------------------------------------------------------------------
27 #define UR4(I1,I2,I3,N) ur(I1,I2,I3,N)
28 #define US4(I1,I2,I3,N) us(I1,I2,I3,N)
29 #define UT4(I1,I2,I3,N) ut(I1,I2,I3,N)
30 #include "cgux4a.h" // define 4th order difference approximations
31 
32 //------------------------------------------------------------------------------------
33 // This function defines derivatives for all derivative types
34 // derivativeType : which derivative to compute
35 // ux : array to put the results in
36 // 4: order of accuracy 2 or 4
37 // .nd : number of dimensions 2 or 3
38 // Notes:
39 // This macro calls one of the macros UX22, UX23, UX42, UX43 etc,
40 // (defined in the include file cgux2a.h or cgux4a.h) to compute a
41 // derivative to first or second order accuracy
42 //------------------------------------------------------------------------------------
43 
44 
45 #endif