aboutsummaryrefslogtreecommitdiff
path: root/src/macro/DXDB_guts.h
blob: c47e81da2b9e699143cd7698c7a2d8a5dbb19bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*@@
  @header   DXDB_guts.h
  @date     Jun 98
  @author   Gabrielle Allen
  @desc

  Macro to calculate the first derivatives of the 
  shift with respect to x

  The macro is defined in terms of standard variables in
  @seefile DXDB_declare.h
  @enddesc
@@*/

#ifndef DXDB_GUTS
#define DXDB_GUTS

#ifdef FCODE 

      DXDB_OO2DX = 1.0D0/(2.0D0*DXDB_DX)

      DXDB_DXDBX = DXDB_OO2DX*(DXDB_BX_IP - DXDB_BX_IM)
      DXDB_DXDBY = DXDB_OO2DX*(DXDB_BY_IP - DXDB_BY_IM)
      DXDB_DXDBZ = DXDB_OO2DX*(DXDB_BZ_IP - DXDB_BZ_IM)

#endif

#ifdef CCODE

      DXDB_OO2DX = 1/(2*cctkGH->cctk_delta_space[0]);
    
      DXDB_DXDBX = DXDB_OO2DX*(DXDB_BX_IP - DXDB_BX_IM);
      DXDB_DXDBY = DXDB_OO2DX*(DXDB_BY_IP - DXDB_BY_IM);
      DXDB_DXDBZ = DXDB_OO2DX*(DXDB_BZ_IP - DXDB_BZ_IM);

#endif

#endif