From 98868b06b605b1ea488a71b109d76c527bc3bfbd Mon Sep 17 00:00:00 2001 From: rhaas Date: Wed, 20 Jun 2012 16:19:10 +0000 Subject: GRHydro: do not access whichpsidcspeed in ParamCheck unless evolve_MHD git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@360 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45 --- src/GRHydro_ParamCheck.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/GRHydro_ParamCheck.F90 b/src/GRHydro_ParamCheck.F90 index 132bb7d..e65486e 100644 --- a/src/GRHydro_ParamCheck.F90 +++ b/src/GRHydro_ParamCheck.F90 @@ -126,7 +126,7 @@ subroutine GRHydro_ParamCheck(CCTK_ARGUMENTS) end if - if(clean_divergence.ne.0) then + if(evolve_MHD.ne.0 .and. clean_divergence.ne.0) then if (CCTK_EQUALS(psidcspeed,"char speed")) then whichpsidcspeed = 0 else if (CCTK_EQUALS(psidcspeed,"light speed")) then @@ -138,6 +138,10 @@ subroutine GRHydro_ParamCheck(CCTK_ARGUMENTS) end if end if + if(clean_divergence.eq.0 .and. evolve_MHD.ne.0) then + call CCTK_WARN(1, "You activated divergence cleaning but do not evolve a magnetic field. At best, nothing should happen, be preapered for a segfault otherwise.") + end if + if (Tmunu_damping_radius_min .gt. Tmunu_damping_radius_max) then call CCTK_WARN(0, "Minimum damping radius is greater than maximum damping radius!") end if -- cgit v1.2.3