[Commits] [svn:einsteintoolkit] incoming/TestMoL/src/ (Rev. 120)

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Fri Mar 14 10:54:54 CDT 2014


User: rhaas
Date: 2014/03/14 10:54 AM

Modified:
 /TestMoL/src/
  Init.c, RHS.c, Register.c

Log:
 remove unused includes, clean up comments, check all return values

File Changes:

Directory: /TestMoL/src/
========================

File [modified]: Init.c
Delta lines: +0 -2
===================================================================
--- TestMoL/src/Init.c	2014-03-13 23:20:40 UTC (rev 119)
+++ TestMoL/src/Init.c	2014-03-14 15:54:53 UTC (rev 120)
@@ -1,8 +1,6 @@
 #include "cctk.h"
 #include "cctk_Parameters.h"
 #include "cctk_Arguments.h"
-#include "cctk_Functions.h"
-#include "cctk_Loop.h"
 
 #include <assert.h>
 

File [modified]: RHS.c
Delta lines: +0 -2
===================================================================
--- TestMoL/src/RHS.c	2014-03-13 23:20:40 UTC (rev 119)
+++ TestMoL/src/RHS.c	2014-03-14 15:54:53 UTC (rev 120)
@@ -1,8 +1,6 @@
 #include "cctk.h"
 #include "cctk_Parameters.h"
 #include "cctk_Arguments.h"
-#include "cctk_Functions.h"
-#include "cctk_Loop.h"
 
 #include <assert.h>
 #include <math.h>

File [modified]: Register.c
Delta lines: +20 -9
===================================================================
--- TestMoL/src/Register.c	2014-03-13 23:20:40 UTC (rev 119)
+++ TestMoL/src/Register.c	2014-03-14 15:54:53 UTC (rev 120)
@@ -1,7 +1,6 @@
 #include "cctk.h"
 #include "cctk_Parameters.h"
 #include "cctk_Arguments.h"
-#include "cctk_Functions.h"
 
 #include <assert.h>
 
@@ -25,10 +24,17 @@
       CCTK_GroupIndex(CCTK_THORNSTRING "::constrained_gf");
     const int sandr_gf_group = CCTK_GroupIndex(CCTK_THORNSTRING "::sandr_gf");
 
-    MoLRegisterEvolvedGroupSlow(evolvedslow_gf_group, rhsslow_gf_group);
-    MoLRegisterEvolvedGroup(evolved_gf_group, rhs_gf_group);
-    MoLRegisterConstrainedGroup(constrained_gf_group);
-    MoLRegisterSaveAndRestoreGroup(sandr_gf_group);
+    const int ierr_evolved_gf_slow =
+      MoLRegisterEvolvedGroupSlow(evolvedslow_gf_group, rhsslow_gf_group);
+    const int ierr_evolved_gf =
+      MoLRegisterEvolvedGroup(evolved_gf_group, rhs_gf_group);
+    const int ierr_constrained_gf =
+      MoLRegisterConstrainedGroup(constrained_gf_group);
+    const int ierr_saveandrestore_gf =
+      MoLRegisterSaveAndRestoreGroup(sandr_gf_group);
+
+    assert(!ierr_evolved_gf_slow && !ierr_evolved_gf && !ierr_constrained_gf &&
+           !ierr_saveandrestore_gf);
   }
 
   if(evolve_grid_array)
@@ -40,11 +46,16 @@
       CCTK_GroupIndex(CCTK_THORNSTRING "::constrained_ga");
     const int sandr_ga_group = CCTK_GroupIndex(CCTK_THORNSTRING "::sandr_ga");
 
-    MoLRegisterEvolvedGroup(evolved_ga_group, rhs_ga_group);
-    MoLRegisterConstrainedGroup(constrained_ga_group);
-    MoLRegisterSaveAndRestoreGroup(sandr_ga_group);
+    const int ierr_evolved_ga =
+      MoLRegisterEvolvedGroup(evolved_ga_group, rhs_ga_group);
+    const int ierr_constrained_ga =
+      MoLRegisterConstrainedGroup(constrained_ga_group);
+    const int ierr_saveandrestore_ga =
+      MoLRegisterSaveAndRestoreGroup(sandr_ga_group);
+
+    assert(!ierr_evolved_ga && !ierr_constrained_ga && !ierr_saveandrestore_ga);
   }
 
-  // TODO: add code to test chaning if variable types
+  // TODO: add code to test changing of variable types
   // TODO: add code to test upgrades from sandr -> constrained -> evolved
 }



More information about the Commits mailing list