[Commits] [svn:einsteintoolkit] GRHydro/ (Rev. 597)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Mon Jan 13 12:49:20 CST 2014
User: rhaas
Date: 2014/01/13 12:49 PM
Modified:
/branches/ET_2013_11/
/branches/ET_2013_11/src/
GRHydro_WENOReconstruct_drv.F90
Log:
fix reconstruct_Wv when using WENO
revision 587 of GRHydro introduced a regression and causes the code to abort
with a segfault if GRHydro::reconstruct_Wv = yes and GRHydro:recon_method =
WENO are both set.
The problem is access to an uninitialized pointer. This commit removes the
pointers and moves the function call using the pointer inside of a set of if
statements which makes the usage of pointer unnecessary.
--Thseline, and those below, will be ignored--
_M .
M src/GRHydro_WENOReconstruct_drv.F90
Directory Changes:
Directory: /branches/ET_2013_11/
================================
Property changes on: branches/ET_2013_11
___________________________________________________________________
Directory: /svn:mergeinfo/
==========================
- /branches/ET_2013_05:523
/branches/divclean:231-243
/branches/hot_and_MHD_temp_dev:166-185
+ /branches/ET_2013_05:523
/branches/divclean:231-243
/branches/hot_and_MHD_temp_dev:166-185
/trunk:596
File Changes:
Directory: /branches/ET_2013_11/src/
====================================
File [modified]: GRHydro_WENOReconstruct_drv.F90
Delta lines: +18 -11
===================================================================
--- branches/ET_2013_11/src/GRHydro_WENOReconstruct_drv.F90 2014-01-13 18:24:44 UTC (rev 596)
+++ branches/ET_2013_11/src/GRHydro_WENOReconstruct_drv.F90 2014-01-13 18:49:20 UTC (rev 597)
@@ -104,8 +104,6 @@
! save memory when MP is not used
CCTK_INT :: GRHydro_UseGeneralCoordinates
- CCTK_REAL, DIMENSION(cctk_ash1,cctk_ash2,cctk_ash3) :: g11, g12, g13, g22, g23, g33
- pointer (pg11,g11), (pg12,g12), (pg13,g13), (pg22,g22), (pg23,g23), (pg33,g33)
integer :: nx, ny, nz, i, j, k, itracer
@@ -223,6 +221,9 @@
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(1),&
w_lorentz(:,j,k)*vel(:,j,k,3),velzminus(:,j,k),velzplus(:,j,k),&
trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call undo_Wv(nx, velxminus(:,j,k), velyminus(:,j,k), velzminus(:,j,k),&
+ velxplus(:,j,k),velyplus(:,j,k),velzplus(:,j,k),&
+ gxx(:,j,k),gxy(:,j,k),gxz(:,j,k),gyy(:,j,k),gyz(:,j,k),gzz(:,j,k))
else
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(1),&
w_lorentz(:,j,k)*lvel(:,j,k,1),velxminus(:,j,k),velxplus(:,j,k),&
@@ -233,10 +234,10 @@
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(1),&
w_lorentz(:,j,k)*lvel(:,j,k,3),velzminus(:,j,k),velzplus(:,j,k),&
trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call undo_Wv(nx, velxminus(:,j,k), velyminus(:,j,k), velzminus(:,j,k),&
+ velxplus(:,j,k),velyplus(:,j,k),velzplus(:,j,k),&
+ gaa(:,j,k),gab(:,j,k),gac(:,j,k),gbb(:,j,k),gbc(:,j,k),gcc(:,j,k))
end if
- call undo_Wv(nx, velxminus(:,j,k), velyminus(:,j,k), velzminus(:,j,k),&
- velxplus(:,j,k),velyplus(:,j,k),velzplus(:,j,k),&
- g11(:,j,k),g12(:,j,k),g13(:,j,k),g22(:,j,k),g23(:,j,k),g33(:,j,k))
endif
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(1),&
eps(:,j,k),epsminus(:,j,k),epsplus(:,j,k),&
@@ -376,6 +377,9 @@
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(2),&
w_lorentz(j,:,k)*vel(j,:,k,3),velzminus(j,:,k),velzplus(j,:,k),&
trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call undo_Wv(ny, velyminus(j,:,k), velzminus(j,:,k), velxminus(j,:,k),&
+ velyplus(j,:,k),velzplus(j,:,k),velxplus(j,:,k),&
+ gyy(j,:,k), gyz(j,:,k), gxy(j,:,k), gzz(j,:,k), gxz(j,:,k), gxx(j,:,k))
else
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(2),&
w_lorentz(j,:,k)*lvel(j,:,k,1),velxminus(j,:,k),velxplus(j,:,k),&
@@ -386,10 +390,10 @@
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(2),&
w_lorentz(j,:,k)*lvel(j,:,k,3),velzminus(j,:,k),velzplus(j,:,k),&
trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call undo_Wv(ny, velyminus(j,:,k), velzminus(j,:,k), velxminus(j,:,k),&
+ velyplus(j,:,k),velzplus(j,:,k),velxplus(j,:,k),&
+ gbb(j,:,k), gbc(j,:,k), gab(j,:,k), gcc(j,:,k), gac(j,:,k), gaa(j,:,k))
end if
- call undo_Wv(ny, velyminus(j,:,k), velzminus(j,:,k), velxminus(j,:,k),&
- velyplus(j,:,k),velzplus(j,:,k),velxplus(j,:,k),&
- g22(j,:,k), g23(j,:,k), g12(j,:,k), g33(j,:,k), g13(j,:,k), g11(j,:,k))
endif
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(2),&
eps(j,:,k),epsminus(j,:,k),epsplus(j,:,k),&
@@ -529,6 +533,9 @@
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(3),&
w_lorentz(j,k,:)*vel(j,k,:,3),velzminus(j,k,:),velzplus(j,k,:),&
trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call undo_Wv(nz, velzminus(j,k,:), velxminus(j,k,:), velyminus(j,k,:),&
+ velzplus(j,k,:),velxplus(j,k,:),velyplus(j,k,:),&
+ gzz(j,k,:), gxz(j,k,:), gyz(j,k,:), gxx(j,k,:), gxy(j,k,:),gyy(j,k,:))
else
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(3),&
w_lorentz(j,k,:)*lvel(j,k,:,1),velxminus(j,k,:),velxplus(j,k,:),&
@@ -539,10 +546,10 @@
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(3),&
w_lorentz(j,k,:)*lvel(j,k,:,3),velzminus(j,k,:),velzplus(j,k,:),&
trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call undo_Wv(nz, velzminus(j,k,:), velxminus(j,k,:), velyminus(j,k,:),&
+ velzplus(j,k,:),velxplus(j,k,:),velyplus(j,k,:),&
+ gcc(j,k,:), gac(j,k,:), gbc(j,k,:), gaa(j,k,:), gab(j,k,:),gbb(j,k,:))
end if
- call undo_Wv(nz, velzminus(j,k,:), velxminus(j,k,:), velyminus(j,k,:),&
- velzplus(j,k,:),velxplus(j,k,:),velyplus(j,k,:),&
- g33(j,k,:), g13(j,k,:), g23(j,k,:), g11(j,k,:), g12(j,k,:),g22(j,k,:))
endif
call GRHydro_WENOReconstruct1d(WENO_order,cctk_lsh(3),&
eps(j,k,:),epsminus(j,k,:),epsplus(j,k,:),&
More information about the Commits
mailing list