[Commits] [svn:einsteintoolkit] NullSHRExtract/branches/tapir/ (Rev. 17)

bela at caltech.edu bela at caltech.edu
Wed Oct 30 21:17:59 CDT 2013


User: szilagyi
Date: 2013/10/30 09:17 PM

Modified:
 /branches/tapir/
  schedule.ccl
 /branches/tapir/src/
  NullSHRE_WTSphHarm.F90

Log:
 work on debugging output

File Changes:

Directory: /branches/tapir/src/
===============================

File [modified]: NullSHRE_WTSphHarm.F90
Delta lines: +72 -104
===================================================================
--- branches/tapir/src/NullSHRE_WTSphHarm.F90	2013-10-31 02:17:42 UTC (rev 16)
+++ branches/tapir/src/NullSHRE_WTSphHarm.F90	2013-10-31 02:17:59 UTC (rev 17)
@@ -7,153 +7,121 @@
 subroutine NullSHRE_WTSphHarm(CCTK_ARGUMENTS)
 
   use NullInterp 
-  use NullDecomp_Vars, only: lmax
-  use NullDecomp_SpinDecomp, only: SpinDecompCoefs
   use NullDecomp_IO
+  use NullSHRE_modVars
 
   implicit none
 
 !variable of interest on the WorldTube x_wt, j_wt, j_l, beta_wt, beta_l, u_wt, u_l
-  CCTK_COMPLEX, dimension (:,:,:), allocatable:: cmplxtmp
 
-  CCTK_COMPLEX, dimension(2:lmax, -lmax:lmax) :: JwtSphCoeff
-  CCTK_COMPLEX, dimension(2:lmax, -lmax:lmax) :: Jwt_lSphCoeff
+  logical, save :: first_time = .TRUE.
+  logical :: truncate
 
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: QwtSphCoeff
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: UwtSphCoeff
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: Uwt_lSphCoeff
+  DECLARE_CCTK_FUNCTIONS
+  DECLARE_CCTK_ARGUMENTS
+  DECLARE_CCTK_PARAMETERS
 
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: BwtSphCoeff
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: Bwt_lSphCoeff
+  truncate = (IO_TruncateOutputFiles(cctkGH) .ne. 0) .and. first_time
+  first_time = .FALSE.
 
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: WwtSphCoeff
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: Wwt_lSphCoeff
+  ! detg
+  call NullDecomp_WriteCoefsForRealFunc('detg_wt', cctkGH, truncate, &
+     null_lsh, zeta, detg_n%d, detg_s%d, cctk_time)
 
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: XwtSphCoeff
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: detgwtSphCoeff
-  CCTK_COMPLEX, dimension(0:lmax, -lmax:lmax) :: r0wtSphCoeff
+   ! g_ij
 
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: CBwtSphCoeff
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: CBwt_xSphCoeff
+  call NullDecomp_WriteCoefsForRealFunc('gD_xx_wt', cctkGH, truncate, &
+    null_lsh, zeta, g_n(1,1)%d, g_s(1,1)%d, cctk_time)
 
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: CKwtSphCoeff
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: CKwt_xSphCoeff
+  call NullDecomp_WriteCoefsForRealFunc('gD_xy_wt', cctkGH, truncate, &
+    null_lsh, zeta, g_n(1,2)%d, g_s(1,2)%d, cctk_time)
 
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: NUwtSphCoeff
-  CCTK_COMPLEX, dimension(1:lmax, -lmax:lmax) :: NUwt_xSphCoeff
+  call NullDecomp_WriteCoefsForRealFunc('gD_xz_wt', cctkGH, truncate, &
+    null_lsh, zeta, g_n(1,3)%d, g_s(1,3)%d, cctk_time)
 
-  logical, save :: first_time = .TRUE.
-  logical :: truncate
+  call NullDecomp_WriteCoefsForRealFunc('gD_yy_wt', cctkGH, truncate, &
+    null_lsh, zeta, g_n(2,2)%d, g_s(2,2)%d, cctk_time)
 
-  DECLARE_CCTK_FUNCTIONS
-  DECLARE_CCTK_ARGUMENTS
-  DECLARE_CCTK_PARAMETERS
+  call NullDecomp_WriteCoefsForRealFunc('gD_yz_wt', cctkGH, truncate, &
+    null_lsh, zeta, g_n(2,3)%d, g_s(2,3)%d, cctk_time)
 
-! do the spherical harmonic decomposition
-  
-  allocate(cmplxtmp(null_lsh(1), null_lsh(2), 2))     
- 
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 2, &
-     zeta, j_wt, JwtSphCoeff)
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 2, &
-     zeta, j_l, Jwt_lSphCoeff)
+  call NullDecomp_WriteCoefsForRealFunc('gD_zz_wt', cctkGH, truncate, &
+    null_lsh, zeta, g_n(3,3)%d, g_s(3,3)%d, cctk_time)
 
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-     zeta, u_wt, UwtSphCoeff)
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-     zeta, u_l, Uwt_lSphCoeff)
+   ! beta^i
 
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-     zeta, q_wt, QwtSphCoeff)
+   call NullDecomp_WriteCoefsForRealFunc('shiftU_x_wt', cctkGH, truncate, &
+    null_lsh, zeta, beta_n(1)%d, beta_s(1)%d, cctk_time)
 
-  cmplxtmp = beta_wt
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, BwtSphCoeff)
+  call NullDecomp_WriteCoefsForRealFunc('shiftU_y_wt', cctkGH, truncate, &
+    null_lsh, zeta, beta_n(2)%d, beta_s(2)%d, cctk_time)
 
-  cmplxtmp = beta_l
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, Bwt_lSphCoeff)
+  call NullDecomp_WriteCoefsForRealFunc('shiftU_z_wt', cctkGH, truncate, &
+    null_lsh, zeta, beta_n(3)%d, beta_s(3)%d, cctk_time)
 
-  cmplxtmp = w_wt
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, WwtSphCoeff)
 
-  cmplxtmp = w_l
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, Wwt_lSphCoeff)
+   ! alpha
 
-  cmplxtmp = x_wt
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, XwtSphCoeff)
+   call NullDecomp_WriteCoefsForRealFunc('alpha_wt', cctkGH, truncate, &
+    null_lsh, zeta, alpha_n%d, alpha_s%d, cctk_time)
 
-  cmplxtmp = WT_r0
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, r0wtSphCoeff)
 
-  cmplxtmp = WT_detg
-  call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 0, &
-     zeta, cmplxtmp, detgwtSphCoeff)
- 
-  deallocate(cmplxtmp)
+   ! null vector 
+  call NullDecomp_WriteCoefsForRealFunc('ell_x_wt', cctkGH, truncate, &
+    null_lsh, zeta, ell_n(1)%d, ell_s(1)%d, cctk_time)
 
+  call NullDecomp_WriteCoefsForRealFunc('ell_y_wt', cctkGH, truncate, &
+    null_lsh, zeta, ell_n(2)%d, ell_s(2)%d, cctk_time)
 
-! call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-!    zeta, cb_wt, CBwtSphCoeff)
-! call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-!    zeta, cb_x, CBwt_xSphCoeff)
+  call NullDecomp_WriteCoefsForRealFunc('ell_z_wt', cctkGH, truncate, &
+    null_lsh, zeta, ell_n(3)%d, ell_s(3)%d, cctk_time)
 
-! call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-!    zeta, ck_wt, CKwtSphCoeff)
-! call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-!    zeta, ck_x, CKwt_xSphCoeff)
+  call NullDecomp_WriteCoefsForRealFunc('ell_t_wt', cctkGH, truncate, &
+    null_lsh, zeta, ell_n(4)%d, ell_s(4)%d, cctk_time)
 
-! call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-!    zeta, nu_wt, NUwtSphCoeff)
-! call SpinDecompCoefs(cctkGH, null_lsh(1), null_lsh(2), 1, &
-!    zeta, nu_x, NUwt_xSphCoeff)
 
-! Only output if this is processor 0
-!  if (MyProc /= 0) return 
-  if (CCTK_MyProc(cctkGH) .gt. 0) then
-     return
-  endif
+   ! xb, rb, r_l, r_t
+  call NullDecomp_WriteCoefsForRealFunc('X_wt', cctkGH, truncate, &
+     null_lsh, zeta, x_wt_n%d, x_wt_s%d, cctk_time)
 
-  ! NullDecomp_WriteCoefFile(FieldName, TruncateFile, Lmin, Lmax, YlmCoef, time)
+  call NullDecomp_WriteCoefsForRealFunc('r0_wt', cctkGH, truncate, &
+     null_lsh, zeta, r0_n%d, r0_s%d, cctk_time)
 
-  truncate = (IO_TruncateOutputFiles(cctkGH) .ne. 0) .and. first_time
+  call NullDecomp_WriteCoefsForRealFunc('r_l_wt', cctkGH, truncate, &
+     null_lsh, zeta, dr0_n(1)%d, dr0_s(1)%d, cctk_time)
 
-  call  NullDecomp_WriteCoefFile('J_wt',   truncate, 2, Lmax, JwtSphCoeff, cctk_time)
-  call  NullDecomp_WriteCoefFile('Jl_wt',  truncate, 2, Lmax, Jwt_lSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForRealFunc('r_t_wt', cctkGH, truncate, &
+     null_lsh, zeta, dr0_n(4)%d, dr0_s(4)%d, cctk_time)
 
-  call  NullDecomp_WriteCoefFile('Q_wt',   truncate, 1, Lmax, QwtSphCoeff, cctk_time)
+   ! J, beta, U, Q, W
 
-  call  NullDecomp_WriteCoefFile('U_wt',   truncate, 1, Lmax, UwtSphCoeff, cctk_time)
-  call  NullDecomp_WriteCoefFile('Ul_wt',  truncate, 1, Lmax, Uwt_lSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForComplexFunc('J_wt', cctkGH, truncate, &
+     null_lsh, 2, zeta, j_wt_n%d, j_wt_s%d, cctk_time)
 
-  call  NullDecomp_WriteCoefFile('B_wt',   truncate, 0, Lmax, BwtSphCoeff, cctk_time)
-  call  NullDecomp_WriteCoefFile('Bl_wt',  truncate, 0, Lmax, Bwt_lSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForComplexFunc('Jl_wt', cctkGH, truncate, &
+     null_lsh, 2, zeta, j_l_n%d, j_l_s%d, cctk_time)
 
-  call  NullDecomp_WriteCoefFile('W_wt',   truncate, 0, Lmax, WwtSphCoeff, cctk_time)
-  call  NullDecomp_WriteCoefFile('Wl_wt',  truncate, 0, Lmax, Wwt_lSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForComplexFunc('Q_wt', cctkGH, truncate, &
+     null_lsh, 1, zeta, q_wt_n%d, q_wt_s%d, cctk_time)
 
-! if(first_order_scheme.ne.0) then
-!   call  NullDecomp_WriteCoefFile('NU_wt',   cctk_iteration.eq.0, 1, Lmax, NUwtSphCoeff, cctk_time)
-!   write (*,*) 'NUwtSphCoeff=',maxval(abs(NUwtSphCoeff))
-!   call  NullDecomp_WriteCoefFile('NUx_wt',  cctk_iteration.eq.0, 1, Lmax, NUwt_xSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForComplexFunc('U_wt', cctkGH, truncate, &
+     null_lsh, 1, zeta, u_wt_n%d, u_wt_s%d, cctk_time)
 
-!   call  NullDecomp_WriteCoefFile('CK_wt',   cctk_iteration.eq.0, 1, Lmax, CKwtSphCoeff, cctk_time)
-!   call  NullDecomp_WriteCoefFile('CKx_wt',  cctk_iteration.eq.0, 1, Lmax, CKwt_xSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForComplexFunc('Ul_wt', cctkGH, truncate, &
+     null_lsh, 2, zeta, u_l_n%d, u_l_s%d, cctk_time)
 
-!   call  NullDecomp_WriteCoefFile('CB_wt',   cctk_iteration.eq.0, 1, Lmax, CBwtSphCoeff, cctk_time)
-!   call  NullDecomp_WriteCoefFile('CBx_wt',  cctk_iteration.eq.0, 1, Lmax, CBwt_xSphCoeff, cctk_time)
-! end if
+  call NullDecomp_WriteCoefsForRealFunc('B_wt', cctkGH, truncate, &
+     null_lsh, zeta, beta_wt_n%d, beta_wt_s%d, cctk_time)
 
-  call  NullDecomp_WriteCoefFile('X_wt',    truncate, 0, Lmax, XwtSphCoeff, cctk_time)
-  call  NullDecomp_WriteCoefFile('r0_wt',   truncate, 0, Lmax, r0wtSphCoeff, cctk_time)
-  call  NullDecomp_WriteCoefFile('detg_wt', truncate, 0, Lmax, detgwtSphCoeff, cctk_time)
+  call NullDecomp_WriteCoefsForRealFunc('Bl_wt', cctkGH, truncate, &
+     null_lsh, zeta, beta_l_n%d, beta_l_s%d, cctk_time)
 
-  first_time = .FALSE.
+  call NullDecomp_WriteCoefsForRealFunc('W_wt', cctkGH, truncate, &
+     null_lsh, zeta, w_wt_n%d, w_wt_s%d, cctk_time)
 
+  call NullDecomp_WriteCoefsForRealFunc('Wl_wt', cctkGH, truncate, &
+     null_lsh, zeta, w_l_n%d, w_l_s%d, cctk_time)
+
 end subroutine NullSHRE_WTSphHarm
 
 

Directory: /branches/tapir/
===========================

File [modified]: schedule.ccl
Delta lines: +6 -0
===================================================================
--- branches/tapir/schedule.ccl	2013-10-31 02:17:42 UTC (rev 16)
+++ branches/tapir/schedule.ccl	2013-10-31 02:17:59 UTC (rev 17)
@@ -243,6 +243,12 @@
 
 if (WT_spherical_harmonics)
 {
+   schedule NullSHRE_Pointing AT ANALYSIS \
+                              BEFORE NullSHRE_WTSphHarm
+   {
+     LANG: Fortran
+     OPTIONS: global
+   }"Gives the target variables for the pointers used in extraction"
 
   schedule NullSHRE_WTSphHarm AT ANALYSIS
   {



More information about the Commits mailing list