[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 345)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Tue Jun 5 15:32:09 CDT 2012
User: rhaas
Date: 2012/06/05 03:32 PM
Modified:
/trunk/src/
GRHydro_RegisterVars.cc
Log:
GRHydro: do not register any SandR variables if MaxNumSandR ==0
this is useful when running with a spacetime code that will register
the ADMBase variables as constrained anyway, so one can save the
memory used for SandR scratch space.
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_RegisterVars.cc
Delta lines: +8 -4
===================================================================
--- trunk/src/GRHydro_RegisterVars.cc 2012-06-05 20:31:21 UTC (rev 344)
+++ trunk/src/GRHydro_RegisterVars.cc 2012-06-05 20:32:09 UTC (rev 345)
@@ -93,9 +93,11 @@
CCTK_WARN(0, "Don't recognize the type of EOS!");
// lapse, metric, curv
- register_saveandrestore("admbase::lapse");
- register_saveandrestore("admbase::metric");
- register_saveandrestore("admbase::curv");
+ if(GRHydro_MaxNumSandRVars != 0) { // hack to save some memory since we "know" that someone else will register these as constrained
+ register_saveandrestore("admbase::lapse");
+ register_saveandrestore("admbase::metric");
+ register_saveandrestore("admbase::curv");
+ }
// shift
if (!CCTK_EQUALS(initial_shift, "none"))
@@ -106,8 +108,10 @@
register_evolved("GRHydro::GRHydro_coords",
"GRHydro::GRHydro_coords_rhs");
}
- else
+ else if(GRHydro_MaxNumSandRVars != 0) // hack to save some memory since we "know" that someone else will register these as constrained
+ {
register_saveandrestore("admbase::shift");
+ }
}
// tracer
More information about the Commits
mailing list