[Commits] [svn:einsteintoolkit] TwoPunctures/branches/momentum_constraint/src/ (Rev. 106)

roland.haas at physics.gatech.edu roland.haas at physics.gatech.edu
Mon May 24 14:48:06 CDT 2010


User: rhaas
Date: 2010/05/24 02:48 PM

Modified:
 /branches/momentum_constraint/src/
  FuncAndJacobian.c, TwoPunctures.c, TwoPunctures.h

Log:
 import changes to EvalAtArbitPosition from trunk
 
 should have happened in this branch in the first place. It's harmless in trunk
 and probably sensible to have, but not required for just vacuum black holes.

File Changes:

Directory: /branches/momentum_constraint/src/
=============================================

File [modified]: FuncAndJacobian.c
Delta lines: +4 -4
===================================================================
--- branches/momentum_constraint/src/FuncAndJacobian.c	2010-05-24 19:21:50 UTC (rev 105)
+++ branches/momentum_constraint/src/FuncAndJacobian.c	2010-05-24 19:48:06 UTC (rev 106)
@@ -681,8 +681,8 @@
 /* --------------------------------------------------------------------------*/
 /* Calculates the value of v at an arbitrary position (A,B,phi)*/
 CCTK_REAL
-PunctEvalAtArbitPosition (CCTK_REAL *v, CCTK_REAL A, CCTK_REAL B, CCTK_REAL phi,
-			  int n1, int n2, int n3)
+PunctEvalAtArbitPosition (CCTK_REAL *v, int ivar, CCTK_REAL A, CCTK_REAL B, CCTK_REAL phi,
+			  int nvar, int n1, int n2, int n3)
 {
   int i, j, k, N;
   CCTK_REAL *p, *values1, **values2, result;
@@ -697,7 +697,7 @@
     for (j = 0; j < n2; j++)
     {
       for (i = 0; i < n1; i++)
-	p[i] = v[i + n1 * (j + n2 * k)];
+	p[i] = v[ivar + nvar * (i + n1 * (j + n2 * k))];
       chebft_Zeros (p, n1, 0);
       values2[j][k] = chebev (-1, 1, p, n1, A);
     }
@@ -834,7 +834,7 @@
   A = 2 * tanh (0.5 * X) - 1;
   B = tan (0.5 * R - Piq);
 
-  result = PunctEvalAtArbitPosition (v.d0, A, B, phi, n1, n2, n3);
+  result = PunctEvalAtArbitPosition (v.d0, ivar, A, B, phi, nvar, n1, n2, n3);
 
   Ui = (A - 1) * result;
 

File [modified]: TwoPunctures.c
Delta lines: +1 -1
===================================================================
--- branches/momentum_constraint/src/TwoPunctures.c	2010-05-24 19:21:50 UTC (rev 105)
+++ branches/momentum_constraint/src/TwoPunctures.c	2010-05-24 19:48:06 UTC (rev 106)
@@ -318,7 +318,7 @@
 
     /* print out ADM mass, eq.: \Delta M_ADM=2*r*u=4*b*V for A=1,B=0,phi=0 */
     admMass = (*mp + *mm
-               - 4*par_b*PunctEvalAtArbitPosition(v.d0, 1, 0, 0, n1, n2, n3));;
+               - 4*par_b*PunctEvalAtArbitPosition(v.d0, 0, 1, 0, 0, nvar, n1, n2, n3));
     CCTK_VInfo (CCTK_THORNSTRING, "The total ADM mass is %g", (double) admMass);
   }
 

File [modified]: TwoPunctures.h
Delta lines: +2 -2
===================================================================
--- branches/momentum_constraint/src/TwoPunctures.h	2010-05-24 19:21:50 UTC (rev 105)
+++ branches/momentum_constraint/src/TwoPunctures.h	2010-05-24 19:48:06 UTC (rev 106)
@@ -39,8 +39,8 @@
 		   int n2, int n3, derivs dv, derivs u, CCTK_REAL *values);
 void SetMatrix_JFD (int nvar, int n1, int n2, int n3,
 		    derivs u, int *ncols, int **cols, CCTK_REAL **Matrix);
-CCTK_REAL PunctEvalAtArbitPosition (CCTK_REAL *v, CCTK_REAL A, CCTK_REAL B, CCTK_REAL phi,
-				 int n1, int n2, int n3);
+CCTK_REAL PunctEvalAtArbitPosition (CCTK_REAL *v, int ivar, CCTK_REAL A, CCTK_REAL B, CCTK_REAL phi,
+				 int nvar, int n1, int n2, int n3);
 void calculate_derivs (int i, int j, int k, int ivar, int nvar, int n1,
 		       int n2, int n3, derivs v, derivs vv);
 CCTK_REAL interpol (CCTK_REAL a, CCTK_REAL b, CCTK_REAL c, derivs v);



More information about the Commits mailing list