aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Cartoon2DBC.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/Cartoon2DBC.c b/src/Cartoon2DBC.c
index be5fb9e..ba995d0 100644
--- a/src/Cartoon2DBC.c
+++ b/src/Cartoon2DBC.c
@@ -74,12 +74,6 @@ int BndCartoon2DVI(const cGH *cctkGH, int tensortype, int prolongtype, int vi)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
- /*** FIXME: can CCTK_SyncGroup() have a 'const cGH *' parameter ?? ***/
- union
- {
- const cGH *const_ptr;
- cGH *non_const_ptr;
- } GH_fake_const;
char * groupname;
@@ -163,11 +157,8 @@ int BndCartoon2DVI(const cGH *cctkGH, int tensortype, int prolongtype, int vi)
/* y = 0 */
j = ny/2;
- /* this union helps us to avoid compiler warning about discarding
- the const qualifier from a pointer target type */
- GH_fake_const.const_ptr = cctkGH;
/* make sure that the input data is synced */
- CCTK_SyncGroupI(GH_fake_const.non_const_ptr, gi);
+ CCTK_SyncGroupI(cctkGH, gi);
/* z-direction: include lower and upper boundary */
for (k = 0; k < lnz; k++)
@@ -284,11 +275,8 @@ int BndCartoon2DVI(const cGH *cctkGH, int tensortype, int prolongtype, int vi)
if (dj == 0) {i -= s; ijk -= s; dj = jj*lnx;}
}
- /* this union helps us to avoid compiler warning about discarding
- the const qualifier from a pointer target type */
- GH_fake_const.const_ptr = cctkGH;
/* syncs needed after interpolation (actually only for x direction) */
- CCTK_SyncGroupI(GH_fake_const.non_const_ptr, gi);
+ CCTK_SyncGroupI(cctkGH, gi);
return(0);
}
@@ -322,7 +310,6 @@ void CCTK_FCALL CCTK_FNAME(BndCartoon2DVN)
int BndCartoon2DGN(const cGH *GH, int tensortype, const char *group)
{
DECLARE_CCTK_PARAMETERS
- int n_group;
if (verbose && GH->cctk_iteration==1) CCTK_VInfo(CCTK_THORNSTRING,"Cartoon2D called for %s (message appears only once)", group);