aboutsummaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-02-13 10:59:29 -0600
committerErik Schnetter <schnetter@cct.lsu.edu>2010-02-13 10:59:29 -0600
commitd80055607ec46c7ec3a2ce62335043b72ecb5e00 (patch)
tree14ace4384c6ee92d31bf757cd09bb4c2711fcc20 /Auxiliary
parent28e774d72de23cb7be50194073a3627922cf9a55 (diff)
Use int instead of CCTK_INT for grid point indices.
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c130
-rw-r--r--Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h56
2 files changed, 93 insertions, 93 deletions
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c
index 877de63..2f3c460 100644
--- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c
+++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c
@@ -48,7 +48,7 @@
/* TODO: provide functions for differencing, use FD macros to evaluate
corresponding functions */
-CCTK_INT sgn(CCTK_REAL x)
+int sgn(CCTK_REAL x)
{
if (x < 0)
return -1;
@@ -70,29 +70,29 @@ CCTK_INT sgn(CCTK_REAL x)
boundaries are treated as interprocessor boundaries.
*/
void GenericFD_GetBoundaryInfo(cGH const * restrict const cctkGH,
- CCTK_INT const * restrict const cctk_lsh,
- CCTK_INT const * restrict const cctk_lssh,
- CCTK_INT const * restrict const cctk_bbox,
- CCTK_INT const * restrict const cctk_nghostzones,
- CCTK_INT * restrict const imin,
- CCTK_INT * restrict const imax,
- CCTK_INT * restrict const is_symbnd,
- CCTK_INT * restrict const is_physbnd,
- CCTK_INT * restrict const is_ipbnd)
+ int const * restrict const cctk_lsh,
+ int const * restrict const cctk_lssh,
+ int const * restrict const cctk_bbox,
+ int const * restrict const cctk_nghostzones,
+ int * restrict const imin,
+ int * restrict const imax,
+ int * restrict const is_symbnd,
+ int * restrict const is_physbnd,
+ int * restrict const is_ipbnd)
{
- CCTK_INT bbox[6];
- CCTK_INT nboundaryzones[6];
- CCTK_INT is_internal[6];
- CCTK_INT is_staggered[6];
- CCTK_INT shiftout[6];
- CCTK_INT symbnd[6];
-
- CCTK_INT symtable = 0;
- CCTK_INT dir = 0;
- CCTK_INT face = 0;
- CCTK_INT npoints = 0;
- CCTK_INT iret = 0;
- CCTK_INT ierr = 0;
+ int bbox[6];
+ int nboundaryzones[6];
+ int is_internal[6];
+ int is_staggered[6];
+ int shiftout[6];
+ int symbnd[6];
+
+ int symtable = 0;
+ int dir = 0;
+ int face = 0;
+ int npoints = 0;
+ int iret = 0;
+ int ierr = 0;
if (CCTK_IsFunctionAliased ("MultiPatch_GetBbox")) {
ierr = MultiPatch_GetBbox (cctkGH, 6, bbox);
@@ -106,7 +106,7 @@ void GenericFD_GetBoundaryInfo(cGH const * restrict const cctkGH,
}
if (CCTK_IsFunctionAliased ("MultiPatch_GetBoundarySpecification")) {
- CCTK_INT const map = MultiPatch_GetMap (cctkGH);
+ int const map = MultiPatch_GetMap (cctkGH);
if (map < 0)
CCTK_WARN(0, "Could not obtain boundary specification");
ierr = MultiPatch_GetBoundarySpecification
@@ -142,7 +142,7 @@ void GenericFD_GetBoundaryInfo(cGH const * restrict const cctkGH,
{
for (face = 0; face < 2; face++)
{
- CCTK_INT index = dir*2 + face;
+ int index = dir*2 + face;
if (is_ipbnd[index])
{
/* Inter-processor boundary */
@@ -180,40 +180,40 @@ void GenericFD_GetBoundaryInfo(cGH const * restrict const cctkGH,
}
-void GenericFD_LoopOverEverything(cGH *cctkGH, Kranc_Calculation calc)
+void GenericFD_LoopOverEverything(cGH const * restrict const cctkGH, Kranc_Calculation const calc)
{
DECLARE_CCTK_ARGUMENTS
- CCTK_INT dir = 0;
- CCTK_INT face = 0;
+ int dir = 0;
+ int face = 0;
CCTK_REAL normal[] = {0,0,0};
CCTK_REAL tangentA[] = {0,0,0};
CCTK_REAL tangentB[] = {0,0,0};
- CCTK_INT bmin[] = {0,0,0};
- CCTK_INT bmax[] = {cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]};
+ int bmin[] = {0,0,0};
+ int bmax[] = {cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]};
calc(cctkGH, dir, face, normal, tangentA, tangentB, bmin, bmax, 0, NULL);
return;
}
-void GenericFD_LoopOverBoundary(cGH *cctkGH, Kranc_Calculation calc)
+void GenericFD_LoopOverBoundary(cGH const * restrict const cctkGH, Kranc_Calculation const calc)
{
DECLARE_CCTK_ARGUMENTS
- CCTK_INT dir1, dir2, dir3;
- CCTK_INT dir[3];
+ int dir1, dir2, dir3;
+ int dir[3];
CCTK_REAL normal[3];
CCTK_REAL tangentA[3];
CCTK_REAL tangentB[3];
- CCTK_INT bmin[3];
- CCTK_INT bmax[3];
- CCTK_INT have_bnd;
- CCTK_INT all_physbnd;
- CCTK_INT d;
-
- CCTK_INT is_symbnd[6], is_physbnd[6], is_ipbnd[6];
- CCTK_INT imin[3], imax[3];
+ int bmin[3];
+ int bmax[3];
+ int have_bnd;
+ int all_physbnd;
+ int d;
+
+ int is_symbnd[6], is_physbnd[6], is_ipbnd[6];
+ int imin[3], imax[3];
int old_dir = 0;
int old_face = 0;
@@ -290,23 +290,23 @@ void GenericFD_LoopOverBoundary(cGH *cctkGH, Kranc_Calculation calc)
}
-void GenericFD_LoopOverBoundaryWithGhosts(cGH *cctkGH, Kranc_Calculation calc)
+void GenericFD_LoopOverBoundaryWithGhosts(cGH const * restrict const cctkGH, Kranc_Calculation const calc)
{
DECLARE_CCTK_ARGUMENTS
- CCTK_INT dir1, dir2, dir3;
- CCTK_INT dir[3];
+ int dir1, dir2, dir3;
+ int dir[3];
CCTK_REAL normal[3];
CCTK_REAL tangentA[3];
CCTK_REAL tangentB[3];
- CCTK_INT bmin[3];
- CCTK_INT bmax[3];
- CCTK_INT have_bnd;
- CCTK_INT have_physbnd;
- CCTK_INT d;
-
- CCTK_INT is_symbnd[6], is_physbnd[6], is_ipbnd[6];
- CCTK_INT imin[3], imax[3];
+ int bmin[3];
+ int bmax[3];
+ int have_bnd;
+ int have_physbnd;
+ int d;
+
+ int is_symbnd[6], is_physbnd[6], is_ipbnd[6];
+ int imin[3], imax[3];
int old_dir = 0;
int old_face = 0;
@@ -383,7 +383,7 @@ void GenericFD_LoopOverBoundaryWithGhosts(cGH *cctkGH, Kranc_Calculation calc)
}
-void GenericFD_LoopOverInterior(cGH *cctkGH, Kranc_Calculation calc)
+void GenericFD_LoopOverInterior(cGH const * restrict const cctkGH, Kranc_Calculation const calc)
{
DECLARE_CCTK_ARGUMENTS
@@ -391,8 +391,8 @@ void GenericFD_LoopOverInterior(cGH *cctkGH, Kranc_Calculation calc)
CCTK_REAL tangentA[] = {0,0,0};
CCTK_REAL tangentB[] = {0,0,0};
- CCTK_INT is_symbnd[6], is_physbnd[6], is_ipbnd[6];
- CCTK_INT imin[3], imax[3];
+ int is_symbnd[6], is_physbnd[6], is_ipbnd[6];
+ int imin[3], imax[3];
int dir = 0;
int face = 0;
@@ -406,15 +406,15 @@ void GenericFD_LoopOverInterior(cGH *cctkGH, Kranc_Calculation calc)
}
-void GenericFD_PenaltyPrim2Char(cGH *cctkGH, CCTK_INT const dir,
- CCTK_INT const face,
+void GenericFD_PenaltyPrim2Char(cGH const * restrict const cctkGH, int const dir,
+ int const face,
CCTK_REAL const * restrict const base,
- CCTK_INT const * restrict const lbnd,
- CCTK_INT const * restrict const lsh,
- CCTK_INT const * restrict const from,
- CCTK_INT const * restrict const to,
- CCTK_INT const rhs_flag,
- CCTK_INT const num_modes,
+ int const * restrict const lbnd,
+ int const * restrict const lsh,
+ int const * restrict const from,
+ int const * restrict const to,
+ int const rhs_flag,
+ int const num_modes,
CCTK_POINTER const * restrict const modes,
CCTK_POINTER const * restrict const speeds,
Kranc_Calculation calc)
@@ -424,8 +424,8 @@ void GenericFD_PenaltyPrim2Char(cGH *cctkGH, CCTK_INT const dir,
CCTK_REAL normal[] = {0,0,0};
CCTK_REAL tangentA[] = {0,0,0};
CCTK_REAL tangentB[] = {0,0,0};
- CCTK_INT bmin[] = {0,0,0};
- CCTK_INT bmax[] = {cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]};
+ int bmin[] = {0,0,0};
+ int bmax[] = {cctk_lssh[CCTK_LSSH_IDX(0,0)],cctk_lssh[CCTK_LSSH_IDX(0,1)],cctk_lssh[CCTK_LSSH_IDX(0,2)]};
CCTK_REAL **all_vars;
int i = 0;
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h
index 3d869f7..8d983b5 100644
--- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h
+++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h
@@ -664,7 +664,7 @@
#endif
#ifdef KRANC_C
-CCTK_INT sgn(CCTK_REAL x);
+int sgn(CCTK_REAL x);
#define Dupwind1(gf,dir,i,j,k) ((dir * gf[CCTK_GFINDEX3D(cctkGH,i+dir,j,k)] \
- dir * gf[CCTK_GFINDEX3D(cctkGH,i,j,k)]) * dxi)
@@ -674,15 +674,15 @@ CCTK_INT sgn(CCTK_REAL x);
- dir * gf[CCTK_GFINDEX3D(cctkGH,i,j,k)]) * dxi)
void GenericFD_GetBoundaryInfo(cGH const * restrict cctkGH,
- CCTK_INT const * restrict cctk_lsh,
- CCTK_INT const * restrict cctk_lssh,
- CCTK_INT const * restrict cctk_bbox,
- CCTK_INT const * restrict cctk_nghostzones,
- CCTK_INT * restrict imin,
- CCTK_INT * restrict imax,
- CCTK_INT * restrict is_symbnd,
- CCTK_INT * restrict is_physbnd,
- CCTK_INT * restrict is_ipbnd);
+ int const * restrict cctk_lsh,
+ int const * restrict cctk_lssh,
+ int const * restrict cctk_bbox,
+ int const * restrict cctk_nghostzones,
+ int * restrict imin,
+ int * restrict imax,
+ int * restrict is_symbnd,
+ int * restrict is_physbnd,
+ int * restrict is_ipbnd);
#if 0
/* Finite differencing near boundaries */
@@ -706,13 +706,13 @@ void GenericFD_GetBoundaryInfo(cGH const * restrict cctkGH,
/* Summation by parts */
static inline CCTK_REAL sbp_deriv_x(int i, int j, int k,
- const CCTK_INT min[], const CCTK_INT max[],
+ const int min[], const int max[],
CCTK_REAL d,
const CCTK_REAL *var, const CCTK_REAL *q,
const cGH *cctkGH)
CCTK_ATTRIBUTE_PURE;
static inline CCTK_REAL sbp_deriv_x(int i, int j, int k,
- const CCTK_INT min[], const CCTK_INT max[],
+ const int min[], const int max[],
CCTK_REAL d,
const CCTK_REAL *var, const CCTK_REAL *q,
const cGH *cctkGH)
@@ -727,13 +727,13 @@ static inline CCTK_REAL sbp_deriv_x(int i, int j, int k,
}
static inline CCTK_REAL sbp_deriv_y(int i, int j, int k,
- const CCTK_INT min[], const CCTK_INT max[],
+ const int min[], const int max[],
CCTK_REAL d,
const CCTK_REAL *var, const CCTK_REAL *q,
const cGH *cctkGH)
CCTK_ATTRIBUTE_PURE;
static inline CCTK_REAL sbp_deriv_y(int i, int j, int k,
- const CCTK_INT min[], const CCTK_INT max[],
+ const int min[], const int max[],
CCTK_REAL d,
const CCTK_REAL *var, const CCTK_REAL *q,
const cGH *cctkGH)
@@ -748,13 +748,13 @@ static inline CCTK_REAL sbp_deriv_y(int i, int j, int k,
}
static inline CCTK_REAL sbp_deriv_z(int i, int j, int k,
- const CCTK_INT min[], const CCTK_INT max[],
+ const int min[], const int max[],
CCTK_REAL d,
const CCTK_REAL *var, const CCTK_REAL *q,
const cGH *cctkGH)
CCTK_ATTRIBUTE_PURE;
static inline CCTK_REAL sbp_deriv_z(int i, int j, int k,
- const CCTK_INT min[], const CCTK_INT max[],
+ const int min[], const int max[],
CCTK_REAL d,
const CCTK_REAL *var, const CCTK_REAL *q,
const cGH *cctkGH)
@@ -770,21 +770,21 @@ static inline CCTK_REAL sbp_deriv_z(int i, int j, int k,
/* New calculation format */
-typedef void(*Kranc_Calculation)(cGH const * cctkGH,
- CCTK_INT dir,
- CCTK_INT face,
+typedef void(*Kranc_Calculation)(cGH const * restrict cctkGH,
+ int eir,
+ int face,
CCTK_REAL const normal[3],
CCTK_REAL const tangentA[3],
CCTK_REAL const tangentB[3],
- CCTK_INT const min[3],
- CCTK_INT const max[3],
- CCTK_INT n_subblock_gfs,
- CCTK_REAL * const subblock_gfs[]);
-
-void GenericFD_LoopOverEverything(cGH *cctkGH, Kranc_Calculation calc);
-void GenericFD_LoopOverBoundary(cGH *cctkGH, Kranc_Calculation calc);
-void GenericFD_LoopOverBoundaryWithGhosts(cGH *cctkGH, Kranc_Calculation calc);
-void GenericFD_LoopOverInterior(cGH *cctkGH, Kranc_Calculation calc);
+ int const min[3],
+ int const max[3],
+ int n_subblock_gfs,
+ CCTK_REAL * restrict const subblock_gfs[]);
+
+void GenericFD_LoopOverEverything(cGH const * restrict cctkGH, Kranc_Calculation calc);
+void GenericFD_LoopOverBoundary(cGH const * restrict cctkGH, Kranc_Calculation calc);
+void GenericFD_LoopOverBoundaryWithGhosts(cGH const * restrict cctkGH, Kranc_Calculation calc);
+void GenericFD_LoopOverInterior(cGH const * restrict cctkGH, Kranc_Calculation calc);