From d599a5abfa9eac2ad39f56567b6f18104b1d17d6 Mon Sep 17 00:00:00 2001 From: schnetter Date: Sun, 11 Apr 2010 01:57:44 +0000 Subject: Remove variables containing derivative of the two-metric. Correct some comments. Remove format statements from VTK output code. Remove output_vtk option. git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/QuasiLocalMeasures/trunk@13 ef6f4158-a8ee-47d1-ba14-cb73256398e0 --- interface.ccl | 10 +++---- param.ccl | 11 +++---- src/qlm_calculate.F90 | 6 ++-- src/qlm_killing_gradient.F90 | 12 ++++---- src/qlm_killing_normalise.F90 | 1 - src/qlm_killing_test.F90 | 13 ++++---- src/qlm_killing_transport.F90 | 2 +- src/qlm_killing_transportation.F90 | 13 ++++---- src/qlm_output_vtk.F90 | 38 ++++++++---------------- src/qlm_twometric.F90 | 24 +++++++-------- src/qlm_variables.F90 | 61 ++++++++++++++++++++++++++------------ 11 files changed, 99 insertions(+), 92 deletions(-) diff --git a/interface.ccl b/interface.ccl index 050d3d0..3cb4cd0 100644 --- a/interface.ccl +++ b/interface.ccl @@ -109,7 +109,7 @@ COMPLEX qlm_weyl_scalars[num_surfaces] TYPE=array DIM=2 SIZE=SphericalSurface::m REAL qlm_ricci_scalars[num_surfaces] TYPE=array DIM=2 SIZE=SphericalSurface::maxntheta,SphericalSurface::maxnphi DISTRIB=constant TAGS='Checkpoint="no"' TAGS='convergence_power=1' { - qlm_phi00 # Ricci tensor, temporarily not available by qlm_weyl_2, change back to qlm_weyl_scalars in qlm_calculate to get them + qlm_phi00 # Ricci tensor qlm_phi11 qlm_phi01 qlm_phi12 @@ -119,17 +119,15 @@ REAL qlm_ricci_scalars[num_surfaces] TYPE=array DIM=2 SIZE=SphericalSurface::max qlm_phi22 qlm_phi20 - qlm_lambda # Ricci scalar + qlm_lambda # Ricci scalar - qlm_lie_n_theta_l # Lie_n Theta_(l) + qlm_lie_n_theta_l # Lie_n Theta_(l) } "Ricci scalars" REAL qlm_twometric[num_surfaces] TYPE=array DIM=2 SIZE=SphericalSurface::maxntheta,SphericalSurface::maxnphi DISTRIB=constant TAGS='Checkpoint="no"' TAGS='convergence_power=1' { qlm_qtt qlm_qtp qlm_qpp - qlm_dqttt qlm_dqtpt qlm_dqppt - qlm_dqttp qlm_dqtpp qlm_dqppp - qlm_rsc + qlm_rsc # 2-Ricci scalar } "2-metric" REAL qlm_killing_vector[num_surfaces] TYPE=array DIM=2 SIZE=SphericalSurface::maxntheta,SphericalSurface::maxnphi DISTRIB=constant TAGS='convergence_power=1' diff --git a/param.ccl b/param.ccl index ed01266..e40e623 100644 --- a/param.ccl +++ b/param.ccl @@ -68,14 +68,11 @@ KEYWORD killing_vector_normalisation "Method for normalising the Killing vector "median" :: "Use the median integral line" } "average" -BOOLEAN output_vtk "Output a VTK file with the main 2D arrays?" STEERABLE=always +INT output_vtk_every "Output a VTK file with the main 2D" STEERABLE=always { -} "no" - -INT output_vtk_every "Order of spatial differencing" -{ - *:* :: "output every so many iterations" -} 1 + 0 :: "don't output VTK file" + 1:* :: "output every so many iterations" +} 0 SHARES: ADMBase diff --git a/src/qlm_calculate.F90 b/src/qlm_calculate.F90 index 17b4177..1361266 100644 --- a/src/qlm_calculate.F90 +++ b/src/qlm_calculate.F90 @@ -27,7 +27,7 @@ subroutine qlm_calculate (CCTK_ARGUMENTS) did_allocate = .false. num_procs = CCTK_nProcs (cctkGH) - my_proc = CCTK_MyProc (cctkGH) + my_proc = CCTK_MyProc (cctkGH) do pass = 1, (num_surfaces + num_procs - 1) / num_procs @@ -47,7 +47,7 @@ subroutine qlm_calculate (CCTK_ARGUMENTS) if (verbose/=0 .or. veryverbose/=0) then if (hn > 0) then - write (msg, '("Calculating Isolated and Dynamical Horizon quantities for horizon ",i4)') hn-1 + write (msg, '("Calculating quasi-local quantities for surface ",i4)') hn-1 else write (msg, '("Performing dummy calculation")') end if @@ -113,7 +113,7 @@ subroutine qlm_calculate (CCTK_ARGUMENTS) call qlm_multipoles_normalise (CCTK_PASS_FTOF, hn) end if - if (output_vtk /= 0) then + if (output_vtk_every /= 0) then if (mod(cctk_iteration,output_vtk_every) == 0) then write(slabel,'(I2.2)'), hn write(ilabel,'(I8.8)'), cctk_iteration diff --git a/src/qlm_killing_gradient.F90 b/src/qlm_killing_gradient.F90 index fe970b5..dbcd716 100644 --- a/src/qlm_killing_gradient.F90 +++ b/src/qlm_killing_gradient.F90 @@ -38,12 +38,12 @@ subroutine qlm_killing_gradient (CCTK_ARGUMENTS, hn) qq(2,1) = qq(1,2) #if 0 - dqq(1,1,1) = qlm_dqttt(i,j,hn) - dqq(1,1,2) = qlm_dqttp(i,j,hn) - dqq(1,2,1) = qlm_dqtpt(i,j,hn) - dqq(1,2,2) = qlm_dqtpp(i,j,hn) - dqq(2,2,1) = qlm_dqppt(i,j,hn) - dqq(2,2,2) = qlm_dqppp(i,j,hn) + dqq(1,1,1) = qlm_dqttt(i,j) + dqq(1,1,2) = qlm_dqttp(i,j) + dqq(1,2,1) = qlm_dqtpt(i,j) + dqq(1,2,2) = qlm_dqtpp(i,j) + dqq(2,2,1) = qlm_dqppt(i,j) + dqq(2,2,2) = qlm_dqppp(i,j) dqq(2,1,:) = dqq(1,2,:) #endif diff --git a/src/qlm_killing_normalise.F90 b/src/qlm_killing_normalise.F90 index 0d044f1..7b0bb66 100644 --- a/src/qlm_killing_normalise.F90 +++ b/src/qlm_killing_normalise.F90 @@ -59,7 +59,6 @@ subroutine qlm_killing_normalise (CCTK_ARGUMENTS, hn) end do if (nsteps < 0) then call CCTK_WARN (1, "Did not manage to integrate along a Killing vector field line loop") - ! qlm_calc_error(hn) = 1 qlm_have_killing_vector(hn) = 0 factor = 1 goto 9999 diff --git a/src/qlm_killing_test.F90 b/src/qlm_killing_test.F90 index d268824..a4793c1 100644 --- a/src/qlm_killing_test.F90 +++ b/src/qlm_killing_test.F90 @@ -9,6 +9,7 @@ subroutine qlm_killing_test (CCTK_ARGUMENTS, hn) use cctk use qlm_boundary use qlm_derivs + use qlm_variables implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_FUNCTIONS @@ -43,12 +44,12 @@ subroutine qlm_killing_test (CCTK_ARGUMENTS, hn) qq(2,2) = qlm_qpp(i,j,hn) qq(2,1) = qq(1,2) - dqq(1,1,1) = qlm_dqttt(i,j,hn) - dqq(1,2,1) = qlm_dqtpt(i,j,hn) - dqq(2,2,1) = qlm_dqppt(i,j,hn) - dqq(1,1,2) = qlm_dqttp(i,j,hn) - dqq(1,2,2) = qlm_dqtpp(i,j,hn) - dqq(2,2,2) = qlm_dqppp(i,j,hn) + dqq(1,1,1) = qlm_dqttt(i,j) + dqq(1,2,1) = qlm_dqtpt(i,j) + dqq(2,2,1) = qlm_dqppt(i,j) + dqq(1,1,2) = qlm_dqttp(i,j) + dqq(1,2,2) = qlm_dqtpp(i,j) + dqq(2,2,2) = qlm_dqppp(i,j) dqq(2,1,:) = dqq(1,2,:) xi(1) = qlm_xi_t(i,j,hn) diff --git a/src/qlm_killing_transport.F90 b/src/qlm_killing_transport.F90 index 3ec4f7e..544f30b 100644 --- a/src/qlm_killing_transport.F90 +++ b/src/qlm_killing_transport.F90 @@ -8,9 +8,9 @@ subroutine qlm_killing_transport (CCTK_ARGUMENTS, hn) use cctk use constants + use lapack use qlm_boundary use qlm_killing_transportation - use lapack implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_FUNCTIONS diff --git a/src/qlm_killing_transportation.F90 b/src/qlm_killing_transportation.F90 index 779e524..75df49c 100644 --- a/src/qlm_killing_transportation.F90 +++ b/src/qlm_killing_transportation.F90 @@ -8,6 +8,7 @@ module qlm_killing_transportation use cctk use constants + use qlm_variables use ricci2 use tensor2 implicit none @@ -133,12 +134,12 @@ contains qq(2,2) = qlm_qpp(i,j,hn) qq(2,1) = qq(1,2) - dqq(1,1,1) = qlm_dqttt(i,j,hn) - dqq(1,2,1) = qlm_dqtpt(i,j,hn) - dqq(2,2,1) = qlm_dqppt(i,j,hn) - dqq(1,1,2) = qlm_dqttp(i,j,hn) - dqq(1,2,2) = qlm_dqtpp(i,j,hn) - dqq(2,2,2) = qlm_dqppp(i,j,hn) + dqq(1,1,1) = qlm_dqttt(i,j) + dqq(1,2,1) = qlm_dqtpt(i,j) + dqq(2,2,1) = qlm_dqppt(i,j) + dqq(1,1,2) = qlm_dqttp(i,j) + dqq(1,2,2) = qlm_dqtpp(i,j) + dqq(2,2,2) = qlm_dqppp(i,j) dqq(2,1,:) = dqq(1,2,:) rsc = qlm_rsc(i,j,hn) diff --git a/src/qlm_output_vtk.F90 b/src/qlm_output_vtk.F90 index 4f0e077..8a1f81f 100644 --- a/src/qlm_output_vtk.F90 +++ b/src/qlm_output_vtk.F90 @@ -3,8 +3,6 @@ #include "cctk_Functions.h" #include "cctk_Parameters.h" -#include "qlm_variables.h" - subroutine qlm_outputvtk(CCTK_ARGUMENTS,nhor,file_name,unit_nr) use cctk use constants @@ -28,11 +26,11 @@ subroutine qlm_outputvtk(CCTK_ARGUMENTS,nhor,file_name,unit_nr) open (unit=unit_nr, file=file_name,action='write') - write(unit_nr,400) '# vtk DataFile Version 2.0' - write(unit_nr,400) 'Horizon data' - write(unit_nr,400) 'ASCII' - write(unit_nr,400) 'DATASET POLYDATA' - write(unit_nr,500) 'POINTS', nth*nph, 'float' + write(unit_nr,'(A)') '# vtk DataFile Version 2.0' + write(unit_nr,'(A)') 'Horizon data' + write(unit_nr,'(A)') 'ASCII' + write(unit_nr,'(A)') 'DATASET POLYDATA' + write(unit_nr,'(A,X,I5,X,A)') 'POINTS', nth*nph, 'float' do j=1, nth do i=1, nph @@ -43,18 +41,18 @@ subroutine qlm_outputvtk(CCTK_ARGUMENTS,nhor,file_name,unit_nr) end do end do - write(unit_nr,400) '' - write(unit_nr,300) 'POLYGONS', nph*(nth-1), 5*nph*(nth-1) + write(unit_nr,'(A)') '' + write(unit_nr,'(A,X,I5,X,I10)') 'POLYGONS', nph*(nth-1), 5*nph*(nth-1) do j=0, nth-2 do i=0, nph-2 - write(unit_nr,200) 4, j*nph+i, (j+1)*nph+i, (j+1)*nph+i+1, j*nph+i+1 + write(unit_nr,'(I1,4(I6))') 4, j*nph+i, (j+1)*nph+i, (j+1)*nph+i+1, j*nph+i+1 end do - write(unit_nr,200) 4, j*nph+nph-1, (j+1)*nph+nph-1, (j+1)*nph+1, j*nph+1 + write(unit_nr,'(I1,4(I6))') 4, j*nph+nph-1, (j+1)*nph+nph-1, (j+1)*nph+1, j*nph+1 end do - write(unit_nr,400) '' - write(unit_nr,600) 'POINT_DATA', nth*nph + write(unit_nr,'(A)') '' + write(unit_nr,'(A,X,I5)') 'POINT_DATA', nth*nph call qlm_writescalar(CCTK_PASS_FTOF,nth,nph,nhor,'shape',unit_nr) call qlm_writescalar(CCTK_PASS_FTOF,nth,nph,nhor,'l0',unit_nr) @@ -113,13 +111,6 @@ subroutine qlm_outputvtk(CCTK_ARGUMENTS,nhor,file_name,unit_nr) close(1) -100 format (3(D1.6,X)) -200 format (I1,4(I6)) -300 format (A,X,I5,X,I10) -400 format (A) -500 format (A,X,I5,X,A) -600 format (A,X,I5) - end subroutine qlm_outputvtk subroutine qlm_writescalar(CCTK_ARGUMENTS,nth,nph,nhor,array_name,unit_nr) @@ -303,15 +294,12 @@ subroutine qlm_writescalar(CCTK_ARGUMENTS,nth,nph,nhor,array_name,unit_nr) qlm_nghostsphi(nhor):nph+qlm_nghostsphi(nhor),nhor) end select - write(unit_nr,700) 'SCALARS', array_name, 'float 1' - write(unit_nr,400) 'LOOKUP_TABLE default' + write(unit_nr,'(/A,X,A,X,A)') 'SCALARS', array_name, 'float 1' + write(unit_nr,'(A)') 'LOOKUP_TABLE default' do j=1, nth do i=1, nph write(unit_nr,*) array(j,i) end do end do -400 format (A) -700 format (/A,X,A,X,A) - end subroutine qlm_writescalar diff --git a/src/qlm_twometric.F90 b/src/qlm_twometric.F90 index 7a31c42..72a3d6a 100644 --- a/src/qlm_twometric.F90 +++ b/src/qlm_twometric.F90 @@ -116,12 +116,12 @@ subroutine qlm_calc_twometric (CCTK_ARGUMENTS, hn) qlm_qtp(i,j,hn) = qq(1,2) qlm_qpp(i,j,hn) = qq(2,2) - qlm_dqttt(i,j,hn) = dqq(1,1,1) - qlm_dqtpt(i,j,hn) = dqq(1,2,1) - qlm_dqppt(i,j,hn) = dqq(2,2,1) - qlm_dqttp(i,j,hn) = dqq(1,1,2) - qlm_dqtpp(i,j,hn) = dqq(1,2,2) - qlm_dqppp(i,j,hn) = dqq(2,2,2) + qlm_dqttt(i,j) = dqq(1,1,1) + qlm_dqtpt(i,j) = dqq(1,2,1) + qlm_dqppt(i,j) = dqq(2,2,1) + qlm_dqttp(i,j) = dqq(1,1,2) + qlm_dqtpp(i,j) = dqq(1,2,2) + qlm_dqppp(i,j) = dqq(2,2,2) end do end do @@ -130,11 +130,11 @@ subroutine qlm_calc_twometric (CCTK_ARGUMENTS, hn) call set_boundary (CCTK_PASS_FTOF, hn, qlm_qtp(:,:,hn), +1) call set_boundary (CCTK_PASS_FTOF, hn, qlm_qpp(:,:,hn), +1) - call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqttt(:,:,hn), -1) - call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqtpt(:,:,hn), -1) - call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqppt(:,:,hn), -1) - call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqttp(:,:,hn), -1) - call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqtpp(:,:,hn), -1) - call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqppp(:,:,hn), -1) + call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqttt(:,:), -1) + call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqtpt(:,:), -1) + call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqppt(:,:), -1) + call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqttp(:,:), -1) + call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqtpp(:,:), -1) + call set_boundary (CCTK_PASS_FTOF, hn, qlm_dqppp(:,:), -1) end subroutine qlm_calc_twometric diff --git a/src/qlm_variables.F90 b/src/qlm_variables.F90 index 9343666..bbed2cc 100644 --- a/src/qlm_variables.F90 +++ b/src/qlm_variables.F90 @@ -6,25 +6,27 @@ module qlm_variables public save CCTK_REAL, allocatable, dimension(:,:) :: & - qlm_gxx, qlm_gxy, qlm_gxz, qlm_gyy, qlm_gyz, qlm_gzz, & - qlm_dgxxx, qlm_dgxyx, qlm_dgxzx, qlm_dgyyx, qlm_dgyzx, qlm_dgzzx, & - qlm_dgxxy, qlm_dgxyy, qlm_dgxzy, qlm_dgyyy, qlm_dgyzy, qlm_dgzzy, & - qlm_dgxxz, qlm_dgxyz, qlm_dgxzz, qlm_dgyyz, qlm_dgyzz, qlm_dgzzz, & - qlm_ddgxxxx, qlm_ddgxyxx, qlm_ddgxzxx, qlm_ddgyyxx, qlm_ddgyzxx, qlm_ddgzzxx, & - qlm_ddgxxxy, qlm_ddgxyxy, qlm_ddgxzxy, qlm_ddgyyxy, qlm_ddgyzxy, qlm_ddgzzxy, & - qlm_ddgxxxz, qlm_ddgxyxz, qlm_ddgxzxz, qlm_ddgyyxz, qlm_ddgyzxz, qlm_ddgzzxz, & - qlm_ddgxxyy, qlm_ddgxyyy, qlm_ddgxzyy, qlm_ddgyyyy, qlm_ddgyzyy, qlm_ddgzzyy, & - qlm_ddgxxyz, qlm_ddgxyyz, qlm_ddgxzyz, qlm_ddgyyyz, qlm_ddgyzyz, qlm_ddgzzyz, & - qlm_ddgxxzz, qlm_ddgxyzz, qlm_ddgxzzz, qlm_ddgyyzz, qlm_ddgyzzz, qlm_ddgzzzz, & - qlm_kxx, qlm_kxy, qlm_kxz, qlm_kyy, qlm_kyz, qlm_kzz, & - qlm_dkxxx, qlm_dkxyx, qlm_dkxzx, qlm_dkyyx, qlm_dkyzx, qlm_dkzzx, & - qlm_dkxxy, qlm_dkxyy, qlm_dkxzy, qlm_dkyyy, qlm_dkyzy, qlm_dkzzy, & - qlm_dkxxz, qlm_dkxyz, qlm_dkxzz, qlm_dkyyz, qlm_dkyzz, qlm_dkzzz, & - qlm_alpha, & - qlm_betax, qlm_betay, qlm_betaz, & - qlm_ttt, & - qlm_ttx, qlm_tty, qlm_ttz, & - qlm_txx, qlm_txy, qlm_txz, qlm_tyy, qlm_tyz, qlm_tzz + qlm_gxx, qlm_gxy, qlm_gxz, qlm_gyy, qlm_gyz, qlm_gzz, & + qlm_dgxxx, qlm_dgxyx, qlm_dgxzx, qlm_dgyyx, qlm_dgyzx, qlm_dgzzx, & + qlm_dgxxy, qlm_dgxyy, qlm_dgxzy, qlm_dgyyy, qlm_dgyzy, qlm_dgzzy, & + qlm_dgxxz, qlm_dgxyz, qlm_dgxzz, qlm_dgyyz, qlm_dgyzz, qlm_dgzzz, & + qlm_ddgxxxx, qlm_ddgxyxx, qlm_ddgxzxx, qlm_ddgyyxx, qlm_ddgyzxx, qlm_ddgzzxx, & + qlm_ddgxxxy, qlm_ddgxyxy, qlm_ddgxzxy, qlm_ddgyyxy, qlm_ddgyzxy, qlm_ddgzzxy, & + qlm_ddgxxxz, qlm_ddgxyxz, qlm_ddgxzxz, qlm_ddgyyxz, qlm_ddgyzxz, qlm_ddgzzxz, & + qlm_ddgxxyy, qlm_ddgxyyy, qlm_ddgxzyy, qlm_ddgyyyy, qlm_ddgyzyy, qlm_ddgzzyy, & + qlm_ddgxxyz, qlm_ddgxyyz, qlm_ddgxzyz, qlm_ddgyyyz, qlm_ddgyzyz, qlm_ddgzzyz, & + qlm_ddgxxzz, qlm_ddgxyzz, qlm_ddgxzzz, qlm_ddgyyzz, qlm_ddgyzzz, qlm_ddgzzzz, & + qlm_kxx, qlm_kxy, qlm_kxz, qlm_kyy, qlm_kyz, qlm_kzz, & + qlm_dkxxx, qlm_dkxyx, qlm_dkxzx, qlm_dkyyx, qlm_dkyzx, qlm_dkzzx, & + qlm_dkxxy, qlm_dkxyy, qlm_dkxzy, qlm_dkyyy, qlm_dkyzy, qlm_dkzzy, & + qlm_dkxxz, qlm_dkxyz, qlm_dkxzz, qlm_dkyyz, qlm_dkyzz, qlm_dkzzz, & + qlm_alpha, & + qlm_betax, qlm_betay, qlm_betaz, & + qlm_ttt, & + qlm_ttx, qlm_tty, qlm_ttz, & + qlm_txx, qlm_txy, qlm_txz, qlm_tyy, qlm_tyz, qlm_tzz + CCTK_REAL, allocatable, dimension(:,:) :: & + qlm_dqttt, qlm_dqtpt, qlm_dqppt, qlm_dqttp, qlm_dqtpp, qlm_dqppp type tetrad_derivs ! nabla_ll(a,b) = D_b l_a @@ -141,6 +143,13 @@ contains allocate(qlm_tyz(ntheta,nphi)) allocate(qlm_tzz(ntheta,nphi)) + allocate(qlm_dqttt(ntheta,nphi)) + allocate(qlm_dqtpt(ntheta,nphi)) + allocate(qlm_dqppt(ntheta,nphi)) + allocate(qlm_dqttp(ntheta,nphi)) + allocate(qlm_dqtpp(ntheta,nphi)) + allocate(qlm_dqppp(ntheta,nphi)) + allocate(qlm_tetrad_derivs(ntheta,nphi)) qlm_gxx = TAT_nan() @@ -242,6 +251,13 @@ contains qlm_tyz = TAT_nan() qlm_tzz = TAT_nan() + qlm_dqttt = TAT_nan() + qlm_dqtpt = TAT_nan() + qlm_dqppt = TAT_nan() + qlm_dqttp = TAT_nan() + qlm_dqtpp = TAT_nan() + qlm_dqppp = TAT_nan() + tetrad_derivs_nan%nabla_ll = TAT_nan() tetrad_derivs_nan%nabla_nn = TAT_nan() tetrad_derivs_nan%nabla_mm = cmplx(TAT_nan(),TAT_nan(),rk) @@ -348,6 +364,13 @@ contains deallocate(qlm_tyz) deallocate(qlm_tzz) + deallocate(qlm_dqttt) + deallocate(qlm_dqtpt) + deallocate(qlm_dqppt) + deallocate(qlm_dqttp) + deallocate(qlm_dqtpp) + deallocate(qlm_dqppp) + deallocate(qlm_tetrad_derivs) end subroutine deallocate_variables -- cgit v1.2.3