diff options
author | bmundim <bmundim@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2011-01-06 01:13:02 +0000 |
---|---|---|
committer | bmundim <bmundim@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2011-01-06 01:13:02 +0000 |
commit | f2cdc7f3a147f13dd3f4861c101f995f8cbfbd05 (patch) | |
tree | b5ea1d82267b2454d6afd70afb4cd3ee962c8d8d /src/GRHydro_Con2PrimM.F90 | |
parent | e684ca4eded7391a7a03d5361ed2088b47f38c4f (diff) |
RIT MHD development:
Fix race conditions arising in the Con2Prim routines.
Now both GNU and Intel compilers agree on the results
for the magnetic tests.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@208 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src/GRHydro_Con2PrimM.F90')
-rw-r--r-- | src/GRHydro_Con2PrimM.F90 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/GRHydro_Con2PrimM.F90 b/src/GRHydro_Con2PrimM.F90 index 7367e45..79e24eb 100644 --- a/src/GRHydro_Con2PrimM.F90 +++ b/src/GRHydro_Con2PrimM.F90 @@ -94,7 +94,7 @@ subroutine Conservative2PrimitiveM(CCTK_ARGUMENTS) !$OMP PARALLEL DO PRIVATE(i,j,itracer,& !$OMP uxx, uxy, uxz, uyy, uyz, uzz, det, epsnegative, & - !$OMP b2,local_gam,xrho,xpress,local_K,local_pgam,sc) + !$OMP b2,xrho,xeps,xpress,xtemp,local_K,local_pgam,sc,keyerr,anyerr) do k = 1, nz do j = 1, ny do i = 1, nx @@ -142,6 +142,7 @@ subroutine Conservative2PrimitiveM(CCTK_ARGUMENTS) scon(i,j,k,:) = 0.d0 vel(i,j,k,:) = 0.d0 w_lorentz(i,j,k) = 1.d0 + xtemp = 0.0d0 call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,& rho(i,j,k),eps(i,j,k),xtemp,xye,press(i,j,k),keyerr,anyerr) @@ -225,13 +226,14 @@ subroutine Conservative2PrimitiveM(CCTK_ARGUMENTS) call CCTK_WARN(GRHydro_NaN_verbose+2, 'Specific internal energy just went below 0, trying polytype.') !$OMP END CRITICAL - xrho=10.0d0 + xrho=1.0d0; xtemp=0.0d0; xeps=1.0d0 call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,& - 1.d0,1.0d0,xtemp,xye,xpress,keyerr,anyerr) - local_K = xpress + xrho,xeps,xtemp,xye,xpress,keyerr,anyerr) + local_K = xpress; + xrho=10.0d0; xeps=1.0d0 call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,& - xrho,1.0d0,xtemp,xye,xpress,keyerr,anyerr) + xrho,xeps,xtemp,xye,xpress,keyerr,anyerr) local_pgam=log(xpress/local_K)/log(xrho) sc = local_K*dens(i,j,k) |