aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrideout <rideout@6a38eb6e-646e-4a02-a296-d141613ad6c4>2003-08-18 18:10:26 +0000
committerrideout <rideout@6a38eb6e-646e-4a02-a296-d141613ad6c4>2003-08-18 18:10:26 +0000
commitd6fce9d9ab97b13a97252d2cd991ffeb3327889d (patch)
treef0a4ccc022a842de8cfe5b204fc77ee293568ae5
parentf34544d09c8edd3a842def338051c3a96b0acfd1 (diff)
some CCTK_INT vs. int fixes
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@242 6a38eb6e-646e-4a02-a296-d141613ad6c4
-rw-r--r--src/CopyBoundary.c22
-rw-r--r--src/FlatBoundary.c15
-rw-r--r--src/RadiationBoundary.c40
-rw-r--r--src/RobinBoundary.c3
-rw-r--r--src/ScalarBoundary.c13
-rw-r--r--src/StaticBoundary.c23
6 files changed, 62 insertions, 54 deletions
diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c
index cc266de..c6e1721 100644
--- a/src/CopyBoundary.c
+++ b/src/CopyBoundary.c
@@ -30,7 +30,7 @@ static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusBase_Boundary_CopyBoundary_c);
static int ApplyBndCopy (const cGH *GH,
- int stencil_dir,
+ CCTK_INT stencil_dir,
const CCTK_INT *stencil_alldirs,
int dir,
int first_var_to,
@@ -183,7 +183,8 @@ CCTK_INT BndCopy(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
gdim = CCTK_GroupDimI(gi);
if (gdim > max_gdim)
{
- width_alldirs = realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
+ width_alldirs = (CCTK_INT *)
+ realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
max_gdim = gdim;
}
@@ -1032,13 +1033,13 @@ void CCTK_FCALL CCTK_FNAME (BndCopyVN)
@vtype const cGH *
@vio in
@endvar
- @var stencil_dir
- @vdesc stencil width in direction dir
- @vtype int
+ @var width_dir
+ @vdesc boundary width in direction dir
+ @vtype CCTK_INT
@vio in
@endvar
- @var stencil_alldirs
- @vdesc stencil widths for all directions
+ @var in_widths
+ @vdesc boundary widths for all directions
@vtype CCTK_INT [ dimension of variable(s) ]
@vio in
@endvar
@@ -1084,7 +1085,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyVN)
@endreturndesc
@@*/
static int ApplyBndCopy (const cGH *GH,
- int width_dir,
+ CCTK_INT width_dir,
const CCTK_INT *in_widths,
int dir,
int first_var_to,
@@ -1095,7 +1096,8 @@ static int ApplyBndCopy (const cGH *GH,
int timelvl_to, timelvl_from;
int gindex, gdim;
int var_to, var_from, vtypesize;
- int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM], widths[2*MAXDIM];
+ int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM];
+ CCTK_INT widths[2*MAXDIM];
SymmetryGHex *sGHex;
@@ -1131,7 +1133,7 @@ static int ApplyBndCopy (const cGH *GH,
}
else if (in_widths)
{
- memcpy (widths, in_widths, 2 * gdim * sizeof (int));
+ memcpy (widths, in_widths, 2 * gdim * sizeof (CCTK_INT));
}
else
{
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c
index 4f9e9e3..9f4308e 100644
--- a/src/FlatBoundary.c
+++ b/src/FlatBoundary.c
@@ -33,7 +33,7 @@ static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusBase_Boundary_FlatBoundary_c);
static int ApplyBndFlat (const cGH *GH,
- int stencil_dir,
+ CCTK_INT stencil_dir,
const CCTK_INT *stencil_alldirs,
int dir,
int first_var,
@@ -139,7 +139,8 @@ CCTK_INT BndFlat(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
gdim = CCTK_GroupDimI(gi);
if (gdim > max_gdim)
{
- width_alldirs = realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
+ width_alldirs = (CCTK_INT *)
+ realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
max_gdim = gdim;
}
@@ -870,7 +871,7 @@ void CCTK_FCALL CCTK_FNAME (BndFlatVN)
@endvar
@var width_dir
@vdesc boundary width in direction dir
- @vtype int
+ @vtype CCTK_INT
@vio in
@endvar
@var in_widths
@@ -915,7 +916,7 @@ void CCTK_FCALL CCTK_FNAME (BndFlatVN)
@endreturndesc
@@*/
static int ApplyBndFlat (const cGH *GH,
- int width_dir,
+ CCTK_INT width_dir,
const CCTK_INT *in_widths,
int dir,
int first_var,
@@ -923,8 +924,8 @@ static int ApplyBndFlat (const cGH *GH,
{
int i, j, k;
int var, vtypesize, gindex, gdim, timelvl;
- int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM],
- widths[2*MAXDIM];
+ int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM];
+ CCTK_INT widths[2*MAXDIM];
SymmetryGHex *sGHex;
@@ -960,7 +961,7 @@ static int ApplyBndFlat (const cGH *GH,
}
else if (in_widths)
{
- memcpy (widths, in_widths, 2 * gdim * sizeof (int));
+ memcpy (widths, in_widths, 2 * gdim * sizeof (CCTK_INT));
}
else
{
diff --git a/src/RadiationBoundary.c b/src/RadiationBoundary.c
index 32ea545..98ea3b9 100644
--- a/src/RadiationBoundary.c
+++ b/src/RadiationBoundary.c
@@ -90,12 +90,12 @@ static int ApplyBndRadiative (const cGH *GH,
int dir,
CCTK_REAL var0,
CCTK_REAL speed,
- int first_var_to,
- int first_var_from,
+ CCTK_INT first_var_to,
+ CCTK_INT first_var_from,
int num_vars);
static int OldApplyBndRadiative (const cGH *GH,
int stencil_dir,
- const int *stencil_alldirs,
+ const CCTK_INT *stencil_alldirs,
int dir,
CCTK_REAL var0,
CCTK_REAL speed,
@@ -182,6 +182,7 @@ CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
/* CCTK_WARN(0, "stopping code"); */
#endif
+ /* Initialize variables */
retval = 0; width_alldirs = NULL; max_gdim = 0;
/* loop through variables, j at a time */
@@ -246,7 +247,7 @@ CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
prev_time_level_name = malloc(value_size*sizeof(char));
Util_TableGetString(tables[i], value_size, prev_time_level_name,
"PREVIOUS TIME LEVEL");
- prev_time_level = CCTK_VarIndex(prev_time_level_name);
+ prev_time_level = (CCTK_INT) CCTK_VarIndex(prev_time_level_name);
free(prev_time_level_name);
} else if (value_type==CCTK_VARIABLE_INT)
{
@@ -269,7 +270,8 @@ CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
gdim = CCTK_GroupDimI(gi);
if (gdim > max_gdim)
{
- width_alldirs = realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
+ width_alldirs =
+ (CCTK_INT *) realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
max_gdim = gdim;
}
@@ -302,7 +304,7 @@ CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
/* Apply the boundary condition */
if ((retval = ApplyBndRadiative(GH, 0, width_alldirs, dir, limit, speed,
- vars[i], prev_time_level, j)) < 0)
+ vars[i], prev_time_level, j)) < 0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
"ApplyBndRadiative() returned %d", retval);
@@ -543,9 +545,9 @@ int BndRadiativeGI (const cGH *GH,
first_vi_from = CCTK_FirstVarIndexI (gi_from);
if (first_vi_to >= 0 && first_vi_from >= 0)
{
- retval = OldApplyBndRadiative (GH, -1, stencil, 0, var0, speed,
- first_vi_to, first_vi_from,
- CCTK_NumVarsInGroupI (gi_to));
+ retval = OldApplyBndRadiative (GH, -1, (const CCTK_INT *) stencil, 0, var0,
+ speed, first_vi_to, first_vi_from,
+ CCTK_NumVarsInGroupI (gi_to));
}
else
{
@@ -913,7 +915,7 @@ int BndRadiativeVI (const cGH *GH,
num_vars = CCTK_NumVars ();
if (vi_to >= 0 && vi_to < num_vars && vi_from >= 0 && vi_from < num_vars)
{
- retval = OldApplyBndRadiative (GH, -1, stencil, 0, var0, speed,
+ retval = OldApplyBndRadiative (GH, -1, (const CCTK_INT *) stencil, 0, var0, speed,
vi_to, vi_from, 1);
}
else
@@ -1514,7 +1516,7 @@ void CCTK_FCALL CCTK_FNAME (BndRadiativeVN)
@endvar
@var in_widths
@vdesc boundary widths for all directions
- @vtype int [ dimension of variable(s) ]
+ @vtype const CCTK_INT [ dimension of variable(s) ]
@vio in
@endvar
@var dir
@@ -1534,12 +1536,12 @@ void CCTK_FCALL CCTK_FNAME (BndRadiativeVN)
@endvar
@var first_var_to
@vdesc index of first variable to copy boundaries to
- @vtype int
+ @vtype CCTK_INT
@vio in
@endvar
@var first_var_from
@vdesc index of first variable to copy boundaries from
- @vtype int
+ @vtype CCTK_INT
@vio in
@endvar
@var num_vars
@@ -1574,8 +1576,8 @@ static int ApplyBndRadiative (const cGH *GH,
int dir,
CCTK_REAL var0,
CCTK_REAL speed,
- int first_var_to,
- int first_var_from,
+ CCTK_INT first_var_to,
+ CCTK_INT first_var_from,
int num_vars)
{
DECLARE_CCTK_PARAMETERS;
@@ -1617,7 +1619,7 @@ static int ApplyBndRadiative (const cGH *GH,
}
else if (in_widths)
{
- memcpy (widths, in_widths, 2* gdim * sizeof (int));
+ memcpy (widths, in_widths, 2* gdim * sizeof (CCTK_INT));
}
else
{
@@ -1813,9 +1815,9 @@ static int ApplyBndRadiative (const cGH *GH,
@vtype int
@vio in
@endvar
- @var in_widths
+ @var stencil_alldirs
@vdesc boundary widths for all directions
- @vtype int [ dimension of variable(s) ]
+ @vtype const CCTK_INT [ dimension of variable(s) ]
@vio in
@endvar
@var dir
@@ -1859,7 +1861,7 @@ static int ApplyBndRadiative (const cGH *GH,
int OldApplyBndRadiative(const cGH *GH,
int width_dir,
- const int *stencil_alldirs,
+ const CCTK_INT *stencil_alldirs,
int dir,
CCTK_REAL var0,
CCTK_REAL speed,
diff --git a/src/RobinBoundary.c b/src/RobinBoundary.c
index d8e309b..323ce07 100644
--- a/src/RobinBoundary.c
+++ b/src/RobinBoundary.c
@@ -165,7 +165,8 @@ CCTK_INT BndRobin(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
gdim = CCTK_GroupDimI(gi);
if (gdim > max_gdim)
{
- width_alldirs = realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
+ width_alldirs = (CCTK_INT *)
+ realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
max_gdim = gdim;
}
diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c
index 59f1e8a..42dcedd 100644
--- a/src/ScalarBoundary.c
+++ b/src/ScalarBoundary.c
@@ -31,7 +31,7 @@ static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusBase_Boundary_ScalarBoundary_c);
static int ApplyBndScalar (const cGH *GH,
- int stencil_dir,
+ CCTK_INT stencil_dir,
const CCTK_INT *stencil_alldirs,
int dir,
CCTK_REAL scalar,
@@ -158,7 +158,8 @@ CCTK_INT BndScalar(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars, CCTK_INT *f
gdim = CCTK_GroupDimI(gi);
if (gdim > max_gdim)
{
- width_alldirs = realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
+ width_alldirs =
+ (CCTK_INT *) realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
max_gdim = gdim;
}
@@ -1052,7 +1053,7 @@ void CCTK_FCALL CCTK_FNAME (BndScalarVN)
@endreturndesc
@@*/
static int ApplyBndScalar (const cGH *GH,
- int width_dir,
+ CCTK_INT width_dir,
const CCTK_INT *in_widths,
int dir,
CCTK_REAL scalar,
@@ -1062,8 +1063,8 @@ static int ApplyBndScalar (const cGH *GH,
int i, j, k;
int gindex, gdim;
int var, timelvl;
- int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM],
- widths[2*MAXDIM];
+ int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM];
+ CCTK_INT widths[2*MAXDIM];
SymmetryGHex *sGHex;
/* check the direction parameter */
@@ -1096,7 +1097,7 @@ static int ApplyBndScalar (const cGH *GH,
}
else if (in_widths)
{
- memcpy (widths, in_widths, 2* gdim * sizeof (int));
+ memcpy (widths, in_widths, 2* gdim * sizeof (CCTK_INT));
}
else
{
diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c
index f3b1c2a..c011af5 100644
--- a/src/StaticBoundary.c
+++ b/src/StaticBoundary.c
@@ -25,7 +25,7 @@ static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusBase_Boundary_StaticBoundary_c);
static int ApplyBndStatic (const cGH *GH,
- int stencil_dir,
+ CCTK_INT stencil_dir,
const CCTK_INT *stencil_alldirs,
int dir,
int first_var,
@@ -134,7 +134,8 @@ CCTK_INT BndStatic(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
gdim = CCTK_GroupDimI(gi);
if (gdim > max_gdim)
{
- width_alldirs = realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
+ width_alldirs = (CCTK_INT *)
+ realloc(width_alldirs, 2*gdim*sizeof(CCTK_INT));
max_gdim = gdim;
}
@@ -879,7 +880,7 @@ void CCTK_FCALL CCTK_FNAME (BndStaticVN)
@endvar
@var width_dir
@vdesc boundary width in direction dir
- @vtype int
+ @vtype CCTK_INT
@vio in
@endvar
@var in_widths
@@ -925,18 +926,18 @@ void CCTK_FCALL CCTK_FNAME (BndStaticVN)
@endreturndesc
@@*/
static int ApplyBndStatic (const cGH *GH,
- int width_dir,
- const CCTK_INT *in_widths,
- int dir,
- int first_var,
- int num_vars)
+ CCTK_INT width_dir,
+ const CCTK_INT *in_widths,
+ int dir,
+ int first_var,
+ int num_vars)
{
int i, j, k;
int timelvl_to, timelvl_from;
int gindex, gdim;
int var, vtypesize;
- int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM],
- widths[2*MAXDIM];
+ int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM];
+ CCTK_INT widths[2*MAXDIM];
SymmetryGHex *sGHex;
/* Only apply boundary condition if more than one timelevel */
@@ -977,7 +978,7 @@ static int ApplyBndStatic (const cGH *GH,
}
else if (in_widths)
{
- memcpy (widths, in_widths, 2* gdim * sizeof (int));
+ memcpy (widths, in_widths, 2* gdim * sizeof (CCTK_INT));
}
else
{