aboutsummaryrefslogtreecommitdiff
path: root/src/InitialCopy.c
diff options
context:
space:
mode:
authorhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-04-25 14:19:35 +0000
committerhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-04-25 14:19:35 +0000
commitafb053800f476ae76546dc5709f145a5793ff336 (patch)
treef6d2296029ad13ec8b4f868e1450a3edd9d7f6f8 /src/InitialCopy.c
parent590f97638ac60cddc65374801a286045dbcd8ccc (diff)
Change the commented out debugging statements to ifdef'd out.
Remove old, buggy commented out stuff. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@6 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'src/InitialCopy.c')
-rw-r--r--src/InitialCopy.c72
1 files changed, 30 insertions, 42 deletions
diff --git a/src/InitialCopy.c b/src/InitialCopy.c
index 5d09fa6..0a6a54b 100644
--- a/src/InitialCopy.c
+++ b/src/InitialCopy.c
@@ -35,6 +35,8 @@ CCTK_FILEVERSION(AlphaThorns_MoL_InitialCopy_c);
void MoL_InitialCopy(CCTK_ARGUMENTS);
+void MoL_FillAllLevels(CCTK_ARGUMENTS);
+
/********************************************************************
********************* Other Routine Prototypes *********************
********************************************************************/
@@ -87,15 +89,6 @@ void MoL_InitialCopy(CCTK_ARGUMENTS)
EvolvedVariableIndex[var]);
CurrentVar = (CCTK_REAL*)CCTK_VarDataPtrI(cctkGH, 0,
EvolvedVariableIndex[var]);
- /*
- if (EvolvedVariableIndex[var] == CCTK_VarIndex("adm_bssn::ADM_BS_gxx"))
- {
- printf("Initial copy: Pointer to time levels %ld %ld\n",PreviousVar,
- CurrentVar);
- printf("Level %d:First point of first two levels is %g and %g.\n",
- cctk_levfac[0],PreviousVar[0],CurrentVar[0]);
- }
- */
if (PreviousVar && CurrentVar)
{
memcpy(CurrentVar, PreviousVar, totalsize * sizeof(CCTK_REAL));
@@ -105,15 +98,7 @@ void MoL_InitialCopy(CCTK_ARGUMENTS)
CCTK_VWarn(0,__LINE__,__FILE__,"MoL","Null pointer for variable %s",
CCTK_VarName(EvolvedVariableIndex[var]));
}
-
- /*
- // if (EvolvedVariableIndex[var] == CCTK_VarIndex("adm_bssn::adm_bs_gxx"))
- if (EvolvedVariableIndex[var] == CCTK_VarIndex("wavetoymol::phi"))
- {
- printf("Init copy: Lev %d Current %g.\n",cctk_levfac[0],
- CurrentVar[0]);
- }
- */
+
}
/*
@@ -143,18 +128,15 @@ void MoL_InitialCopy(CCTK_ARGUMENTS)
SandRVariableIndex[var]);
CurrentVar = (CCTK_REAL*)CCTK_VarDataPtrI(cctkGH, 0,
SandRVariableIndex[var]);
- /* ScratchVar = (CCTK_REAL*)CCTK_VarDataPtrI(cctkGH, 0,
- SandRScratchSpace[var]);
- */
ScratchVar = &SandRScratchSpace[var*totalsize];
- /*
+#ifdef MOLDEBUG
printf("Pointers for the SandR vars are to %ld, %ld and %ld.\n",
PreviousVar, CurrentVar, ScratchVar);
printf("Init1:Variable %s, current %g, previous %g, scratch %g\n",
CCTK_VarName(SandRVariableIndex[var]), CurrentVar[0],
PreviousVar[0], ScratchVar[0]);
- */
+#endif
if (PreviousVar && CurrentVar && ScratchVar)
{
memcpy(ScratchVar, CurrentVar, totalsize * sizeof(CCTK_REAL));
@@ -165,11 +147,11 @@ void MoL_InitialCopy(CCTK_ARGUMENTS)
CCTK_VWarn(0,__LINE__,__FILE__,"MoL","Null pointer for variable %s",
CCTK_VarName(SandRScratchSpace[var]));
}
- /*
+#ifdef MOLDEBUG
printf("Init2:Variable %s, current %g, previous %g, scratch %g\n",
CCTK_VarName(SandRVariableIndex[var]), CurrentVar[0],
PreviousVar[0], ScratchVar[0]);
- */
+#endif
}
/*
@@ -214,15 +196,27 @@ void MoL_InitialCopy(CCTK_ARGUMENTS)
return;
}
-/********************************************************************
- ********************* Local Routines *************************
- ********************************************************************/
+ /*@@
+ @routine MoL_FillAllLevels
+ @date Fri Apr 25 16:11:18 2003
+ @author Ian Hawke
+ @desc
+ This routine is a bit of a hack, and I'm still not convinced
+ it is really necessary. It fills the previous timelevels by
+ copying the data from the current timelevels, which should have
+ been set up during the CCTK_INITIAL timebin.
+ It also prints some useful information about the number of
+ registered functions.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
-/*
-Hack
-*/
+@@*/
-void MoL_FillAllLevels(CCTK_ARGUMENTS)
+void MoL_FillAllLevels(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS
@@ -236,9 +230,6 @@ void MoL_FillAllLevels(CCTK_ARGUMENTS)
totalsize = cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2];
-// printf("\n\n Fill all levels \n\n");
-
-
for (var = 0; var < MoLNumEvolvedVariables; var++)
{
CurrentVar = (CCTK_REAL*)CCTK_VarDataPtrI(cctkGH, 0,
@@ -251,13 +242,6 @@ void MoL_FillAllLevels(CCTK_ARGUMENTS)
{
memcpy(PreviousVar, CurrentVar, totalsize * sizeof(CCTK_REAL));
}
- /*
- if (EvolvedVariableIndex[var] == CCTK_VarIndex("wavetoymol::phi"))
- {
- printf("All levels copy: Lev %d tl %d Current %g.\n",cctk_levfac[0],
- level,PreviousVar[0]);
- }
- */
}
}
@@ -310,3 +294,7 @@ void MoL_FillAllLevels(CCTK_ARGUMENTS)
return;
}
+
+/********************************************************************
+ ********************* Local Routines *************************
+ ********************************************************************/