diff options
author | herrmann <herrmann@b2a53a04-0f4f-0410-87ed-f9f25ced00cf> | 2004-06-14 12:22:58 +0000 |
---|---|---|
committer | herrmann <herrmann@b2a53a04-0f4f-0410-87ed-f9f25ced00cf> | 2004-06-14 12:22:58 +0000 |
commit | 83ecf8359e3ab712561cb9f6da658e1acfcdcbf4 (patch) | |
tree | 1ea172556de24ff69089b87f33ca168b6f5fa6d1 | |
parent | 29fbb0c8978abc82e4443dbf1a0c7b3cb52a82ba (diff) |
adding computation and printing of ADM mass.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TwoPunctures/trunk@16 b2a53a04-0f4f-0410-87ed-f9f25ced00cf
-rw-r--r-- | src/TwoPunctures.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/TwoPunctures.c b/src/TwoPunctures.c index b6ebd67..3e78ea9 100644 --- a/src/TwoPunctures.c +++ b/src/TwoPunctures.c @@ -37,6 +37,7 @@ TwoPunctures (CCTK_ARGUMENTS) int i, j, k, ntotal = n1 * n2 * n3 * nvar; static double *F = NULL; static derivs u, v; + double admMass; if (! F) { /* Solve only when called for the first time */ @@ -217,4 +218,10 @@ TwoPunctures (CCTK_ARGUMENTS) free_derivs (&u, ntotal); free_derivs (&v, ntotal); } + + + /* print out ADM mass, eq.: \Delta M_ADM=2*r*u=4*B*V for A=1,B=0,phi=0 */ + admMass=par_m_plus+par_m_minus- + 4*par_b*PunctEvalAtArbitPosition(v.d0, 1, 0, 0, n1, n2, n3); + CCTK_VInfo(CCTK_THORNSTRING,"ADM mass is %f\n",admMass); } |