[Commits] [svn:einsteintoolkit] GRHydro/trunk/ (Rev. 445)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Mon Jan 14 07:54:08 CST 2013
User: rhaas
Date: 2013/01/14 07:54 AM
Modified:
/trunk/
schedule.ccl
Log:
GRHydro: use timelevels parameter in STORAGE statement
rather than if cascade to test for each value
From: Roland Haas <roland.haas at physics.gatech.edu>
File Changes:
Directory: /trunk/
==================
File [modified]: schedule.ccl
Delta lines: +32 -83
===================================================================
--- trunk/schedule.ccl 2013-01-14 13:54:06 UTC (rev 444)
+++ trunk/schedule.ccl 2013-01-14 13:54:08 UTC (rev 445)
@@ -49,57 +49,28 @@
### use of MoL with Einstein ###
#################################################
-if (timelevels == 3)
+STORAGE:dens[timelevels]
+STORAGE:tau[timelevels]
+STORAGE:scon[timelevels]
+if (number_of_particles)
{
- STORAGE:dens[3]
- STORAGE:tau[3]
- STORAGE:scon[3]
- if (number_of_particles)
- {
- STORAGE:particles[3]
- }
- STORAGE: ADMBase::metric[3], ADMBase::curv[3]
- STORAGE: ADMBase::lapse[3]
- if(CCTK_Equals(Y_e_evolution_method,"GRHydro"))
- {
- STORAGE: Y_e_con[3]
- STORAGE: Y_e_con_rhs, Y_e_con_flux, Y_e_plus, Y_e_minus
- }
- if(CCTK_Equals(Bvec_evolution_method,"GRHydro"))
- {
- STORAGE: HydroBase::Bvec[3]
- STORAGE: GRHydro::Bcons[3]
- if (clean_divergence)
- {
- STORAGE:psidc[3]
- }
- }
+ STORAGE:particles[timelevels]
}
-else
+STORAGE: ADMBase::metric[timelevels], ADMBase::curv[timelevels]
+STORAGE: ADMBase::lapse[timelevels]
+if(CCTK_Equals(Y_e_evolution_method,"GRHydro"))
{
- STORAGE:dens[2]
- STORAGE:tau[2]
- STORAGE:scon[2]
- if (number_of_particles)
+ STORAGE: Y_e_con[timelevels]
+ STORAGE: Y_e_con_rhs, Y_e_con_flux, Y_e_plus, Y_e_minus
+}
+if(CCTK_Equals(Bvec_evolution_method,"GRHydro"))
+{
+ STORAGE: HydroBase::Bvec[timelevels]
+ STORAGE: GRHydro::Bcons[timelevels]
+ if (clean_divergence)
{
- STORAGE:particles[2]
+ STORAGE:psidc[timelevels]
}
- STORAGE: ADMBase::metric[2], ADMBase::curv[2]
- STORAGE: ADMBase::lapse[2]
- if(CCTK_Equals(Y_e_evolution_method,"GRHydro"))
- {
- STORAGE: Y_e_con[2]
- STORAGE: Y_e_con_rhs, Y_e_con_flux, Y_e_plus, Y_e_minus
- }
- if(CCTK_Equals(Bvec_evolution_method,"GRHydro"))
- {
- STORAGE: HydroBase::Bvec[2]
- STORAGE: GRHydro::Bcons[2]
- if (clean_divergence)
- {
- STORAGE:psidc[2]
- }
- }
}
STORAGE:evolve_MHD
STORAGE:evolve_Y_e
@@ -123,9 +94,9 @@
}
if (calculate_bcom)
{
- STORAGE:GRHydro::bcom[3]
- STORAGE:GRHydro::bcom0[3]
- STORAGE:GRHydro::bcom_sq[3]
+ STORAGE:GRHydro::bcom[timelevels]
+ STORAGE:GRHydro::bcom0[timelevels]
+ STORAGE:GRHydro::bcom_sq[timelevels]
}
}
STORAGE:GRHydro_eos_scalars
@@ -141,8 +112,8 @@
if (evolve_tracer)
{
- STORAGE:GRHydro_tracers[3]
- STORAGE:GRHydro_cons_tracers[3]
+ STORAGE:GRHydro_tracers[timelevels]
+ STORAGE:GRHydro_cons_tracers[timelevels]
STORAGE:GRHydro_tracer_rhs
}
@@ -183,36 +154,14 @@
### use of MoL with Einstein ###
#################################################
-if (timelevels == 3)
-{
- STORAGE: ADMBase::metric[3], ADMBase::curv[3]
- STORAGE: ADMBase::lapse[3]
-}
-else
-{
- STORAGE: ADMBase::metric[2], ADMBase::curv[2]
- STORAGE: ADMBase::lapse[2]
-}
+STORAGE: ADMBase::metric[timelevels], ADMBase::curv[timelevels]
+STORAGE: ADMBase::lapse[timelevels]
if (!CCTK_Equals(initial_shift,"none"))
{
- if (timelevels == 3)
- {
- STORAGE: ADMBase::shift[3]
- }
- else
- {
- STORAGE: ADMBase::shift[2]
- }
+ STORAGE: ADMBase::shift[timelevels]
if (CCTK_Equals(shift_evolution_method,"Comoving"))
{
- if (timelevels == 3)
- {
- STORAGE: GRHydro_coords[3]
- }
- else
- {
- STORAGE: GRHydro_coords[2]
- }
+ STORAGE: GRHydro_coords[timelevels]
STORAGE: GRHydro_coords_rhs
schedule GRHydro_SetUpCoords IN HydroBase_Initial
@@ -243,11 +192,11 @@
# _and_ we really want to safe this memory then it has to be turned off at
# runtime via CCTK_GroupStorageDecrease
if(CCTK_IsImplementationActive("Coordinates")) {
- STORAGE: lvel[3]
+ STORAGE: lvel[timelevels]
if(CCTK_Equals(Bvec_evolution_method,"GRHydro")) {
- STORAGE: lBvec[3]
+ STORAGE: lBvec[timelevels]
}
- STORAGE: local_metric[3]
+ STORAGE: local_metric[timelevels]
STORAGE: local_extrinsic_curvature
STORAGE: local_shift
}
@@ -830,7 +779,7 @@
{
-##########################################3
+##########################################
### MHD not implemented yet for Flux split FD !!!
##########################################
STORAGE:fs_alpha
@@ -1034,8 +983,8 @@
if (evolve_tracer)
{
- STORAGE:GRHydro_tracers[3]
- STORAGE:GRHydro_cons_tracers[3]
+ STORAGE:GRHydro_tracers[timelevels]
+ STORAGE:GRHydro_cons_tracers[timelevels]
STORAGE:GRHydro_tracer_rhs
}
More information about the Commits
mailing list