[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 300)
roland.haas at physics.gatech.edu
roland.haas at physics.gatech.edu
Mon Nov 21 09:43:52 CST 2011
User: rhaas
Date: 2011/11/21 09:43 AM
Modified:
/trunk/src/
GRHydro_ReconstructPoly.F90
Log:
protect Bvec in ENO polytype reconstruction by evolve_mhd
otherwise unallocated memory is accessed
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_ReconstructPoly.F90
Delta lines: +22 -18
===================================================================
--- trunk/src/GRHydro_ReconstructPoly.F90 2011-11-13 07:18:46 UTC (rev 299)
+++ trunk/src/GRHydro_ReconstructPoly.F90 2011-11-21 15:43:52 UTC (rev 300)
@@ -705,15 +705,17 @@
call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
velz(j,:,k),velzminus(j,:,k),velzplus(j,:,k),&
trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
- Bvecx(j,:,k),Bvecxminus(j,:,k),Bvecxplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
- Bvecy(j,:,k),Bvecyminus(j,:,k),Bvecyplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
- Bvecz(j,:,k),Bveczminus(j,:,k),Bveczplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ if(evolve_mhd.ne.0) then
+ call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
+ Bvecx(j,:,k),Bvecxminus(j,:,k),Bvecxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
+ Bvecy(j,:,k),Bvecyminus(j,:,k),Bvecyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
+ Bvecz(j,:,k),Bveczminus(j,:,k),Bveczplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ end if
else if (CCTK_EQUALS(recon_vars,"conservative")) then
call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
@@ -728,15 +730,17 @@
call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
sz(j,:,k),szminus(j,:,k),szplus(j,:,k),&
trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
- Bconsx(j,:,k),Bconsxminus(j,:,k),Bconsxplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
- Bconsy(j,:,k),Bconsyminus(j,:,k),Bconsyplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
- Bconsz(j,:,k),Bconszminus(j,:,k),Bconszplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ if(evolve_mhd.ne.0) then
+ call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
+ Bconsx(j,:,k),Bconsxminus(j,:,k),Bconsxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
+ Bconsy(j,:,k),Bconsyminus(j,:,k),Bconsyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_ENOReconstruct1d(eno_order,cctk_lsh(2),&
+ Bconsz(j,:,k),Bconszminus(j,:,k),Bconszplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ end if
else
!$OMP CRITICAL
call CCTK_WARN(0, "Variable type to reconstruct not recognized.")
More information about the Commits
mailing list