aboutsummaryrefslogtreecommitdiff
path: root/src/RadiationBoundary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/RadiationBoundary.c')
-rw-r--r--src/RadiationBoundary.c40
1 files changed, 21 insertions, 19 deletions
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,