Computes the spacetime metric from lapse, shift and spatial metric
FT 27.11.2020
Generalized to not be bound to the mesh
FT 07.02.2022
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | lapse |
Lapse function |
||
double precision, | intent(in), | DIMENSION(3) | :: | shift |
Contravariant shift vector |
|
double precision, | intent(in), | DIMENSION(6) | :: | g3 |
Covariant spatial metric |
|
double precision, | intent(inout), | DIMENSION(10) | :: | g4 |
Covariant spacetime metric |
PURE SUBROUTINE compute_g4( lapse, shift, g3, g4 )
!***********************************************
!
!# Computes the spacetime metric from lapse,
! shift and spatial metric
!
! FT 27.11.2020
!
! Generalized to not be bound to the mesh
!
! FT 07.02.2022
!
!***********************************************
USE tensor, ONLY: itt, itx, ity, itz, ixx, ixy, &
ixz, iyy, iyz, izz, jxx, jxy, jxz, &
jyy, jyz, jzz, jx, jy, jz
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: lapse
!! Lapse function
DOUBLE PRECISION, DIMENSION(3), INTENT(IN) :: shift
!! Contravariant shift vector
DOUBLE PRECISION, DIMENSION(6), INTENT(IN) :: g3
!! Covariant spatial metric
DOUBLE PRECISION, DIMENSION(10), INTENT(INOUT):: g4
!! Covariant spacetime metric
g4(itt)= - lapse*lapse + g3(jxx)*shift(jx)*shift(jx) &
+ g3(jxy)*shift(jx)*shift(jy)*two &
+ g3(jxz)*shift(jx)*shift(jz)*two &
+ g3(jyy)*shift(jy)*shift(jy) &
+ g3(jyz)*shift(jy)*shift(jz)*two &
+ g3(jzz)*shift(jz)*shift(jz)
g4(itx)= g3(jxx)*shift(jx) + g3(jxy)*shift(jy) + g3(jxz)*shift(jz)
g4(ity)= g3(jxy)*shift(jx) + g3(jyy)*shift(jy) + g3(jyz)*shift(jz)
g4(itz)= g3(jxz)*shift(jx) + g3(jyz)*shift(jy) + g3(jzz)*shift(jz)
g4(ixx)= g3(jxx)
g4(ixy)= g3(jxy)
g4(ixz)= g3(jxz)
g4(iyy)= g3(jyy)
g4(iyz)= g3(jyz)
g4(izz)= g3(jzz)
END SUBROUTINE compute_g4