sgn_indices.h

Go to the documentation of this file.
00001 /* 
00002 combines
00003 sg.h
00004 Igor Terentyev.
00005 and
00006  
00007 sgn.h
00008 Igor Terentyev.
00009 */
00010 /*============================================================================*/
00011 
00012 #ifndef __SGN_INDICES_H_
00013 #define __SGN_INDICES_H_
00014 /*----------------------------------------------------------------------------*/
00015 
00016 #include "utils.h"
00017 #include "stencil.h"
00018 #include "rdomain.h"
00019 
00020 /*----------------------------------------------------------------------------*/
00021 /*
00022 Indices of arrays - pure acoustic. Permutation of {0,...,3/5/7}.
00023 D_P0  :  pressure.
00024 D_V0  :  velocity.
00025 D_MPx :  pressure multiplier (bulk modulus).
00026 D_MVx :  velocity multiplier (buoyancy).
00027 */
00028 #define D_P0  0
00029 #define D_MP0 1
00030 #define D_V0  2
00031 #define D_MV0 3
00032 #define D_V1  4
00033 #define D_MV1 5
00034 #define D_V2  6
00035 #define D_MV2 7
00036 
00037 /*----------------------------------------------------------------------------*/
00038 /*
00039 Indices of additional arrays due to NPML. Permutation of {4/6/8,...,5/10/15}.
00040 D_P  :  pressure (bar).
00041 D_V  :  velocity (bar).
00042 D_MP :  pressure multiplier (bulk modulus).
00043 D_MV :  velocity multiplier (buoyancy).
00044 D_EV :  eta velocity. Allocated as 1D arrays: Nx1x1.
00045 D_EP :  eta pressure. Allocated as 1D arrays: Nx1x1.
00046  
00047 All pressure arrays must have same global coordinates - P0 is used to get
00048 global coordinates and sizes of all pressure arrays.
00049 */
00050 #define D_EP0 (2 + 2 * RARR_MAX_NDIM)  /* 8  */
00051 #define D_EV0 (D_EP0 + 1)              /* 9  */
00052 #define D_P1  (D_EV0 + 1)              /* 10 */
00053 #define D_EP1 (D_P1  + 1)              /* 11 */
00054 #define D_EV1 (D_EP1 + 1)              /* 12 */
00055 #define D_P2  (D_EV1 + 1)              /* 13 */
00056 #define D_EP2 (D_P2  + 1)              /* 14 */
00057 #define D_EV2 (D_EP2 + 1)              /* 15 */
00058 
00059 /*----------------------------------------------------------------------------*/
00060 #if   RARR_MAX_NDIM == 1
00061     static const IPNT D_V  = {D_V0 };
00062     static const IPNT D_MV = {D_MV0};
00063 #elif RARR_MAX_NDIM == 2
00064     static const IPNT D_V  = {D_V0 , D_V1 };
00065     static const IPNT D_MV = {D_MV0, D_MV1};
00066 #elif RARR_MAX_NDIM >= 3
00067     static const IPNT D_V  = {D_V0 , D_V1 , D_V2 };
00068     static const IPNT D_MV = {D_MV0, D_MV1, D_MV2};
00069 #endif
00070 
00071 #if   RARR_MAX_NDIM == 1
00072     static const IPNT D_P  = {D_P0 };
00073     static const IPNT D_EP = {D_EP0};
00074     static const IPNT D_EV = {D_EV0};
00075 #elif RARR_MAX_NDIM == 2
00076     static const IPNT D_P  = {D_P0 , D_P1 };
00077     static const IPNT D_EP = {D_EP0, D_EP1};
00078     static const IPNT D_EV = {D_EV0, D_EV1};
00079 #elif RARR_MAX_NDIM >= 3
00080     static const IPNT D_P  = {D_P0 , D_P1 , D_P2 };
00081     static const IPNT D_EP = {D_EP0, D_EP1, D_EP2};
00082     static const IPNT D_EV = {D_EV0, D_EV1, D_EV2};
00083 #endif
00084 /*----------------------------------------------------------------------------*/
00085 
00086 #endif

Generated on Thu Dec 6 10:01:28 2012 for IWAVE by  doxygen 1.4.7