From 9945c25058ccd4c17910bf410d4377df2e9e8eed Mon Sep 17 00:00:00 2001 From: schnetter Date: Tue, 26 Apr 2005 19:29:40 +0000 Subject: Disable checking for symmetries in the Ricci tensor derivatives, because the checking cannot handle the case when the derivative is near zero. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinUtils/TGRtensor/trunk@25 b716e942-a2de-43ad-8f52-f3dfe468e4e7 --- src/ricci.F90 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ricci.F90 b/src/ricci.F90 index f14eb49..83b144a 100644 --- a/src/ricci.F90 +++ b/src/ricci.F90 @@ -113,7 +113,7 @@ contains subroutine calc_ricciderivs (gamma, dgamma, ddgamma, dri) CCTK_REAL, intent(in) :: gamma(3,3,3), dgamma(3,3,3,3), ddgamma(3,3,3,3,3) CCTK_REAL, intent(out) :: dri(3,3,3) - CCTK_REAL :: sum, cnt + CCTK_REAL :: nrm, cnt integer :: i,j,k,l,m ! R_ij = Gamma^k_ij,k - Gamma^k_ik,j ! + Gamma^k_lk Gamma^l_ij - Gamma^k_lj Gamma^l_ki @@ -134,18 +134,27 @@ contains end do end do end do +#if 0 +/* Does not work when dri=0 */ ! check symmetries - sum = 0 + nrm = 0 cnt = 0 do i=1,3 do j=1,3 do k=1,3 - sum = sum + (dri(i,j,k) - dri(j,i,k))**2 + nrm = nrm + (dri(i,j,k) - dri(j,i,k))**2 cnt = cnt + dri(i,j,k)**2 end do end do end do - if (sum > 1.0e-12 * cnt) call CCTK_WARN (0, "Ricci tensor is not symmetric") + cnt = cnt + sum(gamma**2) + if (nrm > 1.0e-12 * cnt) then + print *,"nrm cnt ",nrm,cnt + print *,"ddgamma ",ddgamma + print *,"dri ",dri + end if + if (nrm > 1.0e-12 * cnt) call CCTK_WARN (0, "Ricci tensor derivative is not symmetric") +#endif end subroutine calc_ricciderivs end module ricci -- cgit v1.2.3