aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@b716e942-a2de-43ad-8f52-f3dfe468e4e7>2005-04-26 14:48:43 +0000
committerschnetter <schnetter@b716e942-a2de-43ad-8f52-f3dfe468e4e7>2005-04-26 14:48:43 +0000
commitaa4332dbb139ea1e179870a186528212386bae73 (patch)
treeee8fbbd61f1fdf2157ea5b67dbf8d0d3419d48ce
parentf200066992db3a32d01607df031445b0ce3a05c3 (diff)
Add routines for second derivatives of the inverse
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinUtils/TGRtensor/trunk@24 b716e942-a2de-43ad-8f52-f3dfe468e4e7
-rw-r--r--src/tensor.F9024
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tensor.F90 b/src/tensor.F90
index 759c781..66c6552 100644
--- a/src/tensor.F90
+++ b/src/tensor.F90
@@ -14,6 +14,7 @@ module tensor
public calc_inv
public calc_invderiv
+ public calc_invderiv2
public calc_invdot
contains
@@ -116,6 +117,29 @@ contains
end do
end subroutine calc_invderiv
+ subroutine calc_invderiv2 (gu, dgg, dgu, ddgg, ddgu)
+ CCTK_REAL, intent(in) :: gu(3,3), dgg(3,3,3), dgu(3,3,3), ddgg(3,3,3,3)
+ CCTK_REAL, intent(out) :: ddgu(3,3,3,3)
+ integer :: i,j,k,l,m,n
+ do i=1,3
+ do j=1,3
+ do k=1,3
+ do l=1,3
+ ddgu(i,j,k,l) = 0
+ do m=1,3
+ do n=1,3
+ ddgu(i,j,k,l) = ddgu(i,j,k,l) &
+ - dgu(i,m,l) * gu(j,n) * dgg(m,n,k) &
+ - gu(i,m) * dgu(j,n,l) * dgg(m,n,k) &
+ - gu(i,m) * gu(j,n) * ddgg(m,n,k,l)
+ end do
+ end do
+ end do
+ end do
+ end do
+ end do
+ end subroutine calc_invderiv2
+
subroutine calc_invdot (gu, gg_dot, gu_dot)
CCTK_REAL, intent(in) :: gu(3,3), gg_dot(3,3)
CCTK_REAL, intent(out) :: gu_dot(3,3)