aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordorband <dorband@b7a48df3-cbbf-4440-997f-b4b717c9f7fc>2003-03-06 09:19:16 +0000
committerdorband <dorband@b7a48df3-cbbf-4440-997f-b4b717c9f7fc>2003-03-06 09:19:16 +0000
commit37ecaa15d029f7ca274b2db95c6aced9e63b3992 (patch)
treec9ecf89d3ac0e97a508be06517807a1eff35fb51 /src
parentedd43f7e5d3d01f2033a2988cde1e98087fdcdd8 (diff)
Included calculation of a normalized hamiltonian constraint:
hamnormalized git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@83 b7a48df3-cbbf-4440-997f-b4b717c9f7fc
Diffstat (limited to 'src')
-rw-r--r--src/ADMConstraints.F7
-rw-r--r--src/InitSymBound.F7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F
index a6a7703..9c30b1b 100644
--- a/src/ADMConstraints.F
+++ b/src/ADMConstraints.F
@@ -94,6 +94,7 @@ c Fill with zeros.
do i=1,nx
ham(i,j,k) = 0.0D0
+ hamnormalized(i,j,k) = 0.0D0
momx(i,j,k) = 0.0D0
momy(i,j,k) = 0.0D0
@@ -183,6 +184,12 @@ c = (T_00 - 2 beta^i T_{i0} + beta^i beta^j T_{ij})/alpha^2
end if
ham(i,j,k) = HAMADM_HAMADM - 16.0D0*pi*m_rho
+ if ((HAMADM_HAMADMABS + abs(16.0D0*pi*m_rho))==0) then
+ hamnormalized(i,j,k) = abs(ham(i,j,k))
+ else
+ hamnormalized(i,j,k) = abs(ham(i,j,k))/
+ & (HAMADM_HAMADMABS + abs(16.0D0*pi*m_rho))
+ end if
c Calculate the Momentum constraints
diff --git a/src/InitSymBound.F b/src/InitSymBound.F
index 00cfefa..1069c8e 100644
--- a/src/InitSymBound.F
+++ b/src/InitSymBound.F
@@ -48,6 +48,13 @@
sym(1) = -one
sym(2) = one
sym(3) = one
+ call SetCartSymVN(ierr, cctkGH, sym, 'admconstraints::hamnormalized')
+ if (ierr .lt. 0) then
+ call CCTK_WARN(0,"Error setting symmetries for ADMConstraints::hamnormalized")
+ end if
+ sym(1) = -one
+ sym(2) = one
+ sym(3) = one
call SetCartSymVN(ierr, cctkGH, sym, 'admconstraints::momx')
if (ierr .lt. 0) then
call CCTK_WARN(0,"Error setting symmetries for ADMConstraints::momx")