[Commits] [svn:einsteintoolkit] TwoPunctures/trunk/src/ (Rev. 105)
roland.haas at physics.gatech.edu
roland.haas at physics.gatech.edu
Mon May 24 14:21:50 CDT 2010
User: rhaas
Date: 2010/05/24 02:21 PM
Modified:
/trunk/src/
FuncAndJacobian.c, TwoPunctures.c, TwoPunctures.h
Log:
make PunctEvalAtArbitPosition work with more than one variable
File Changes:
Directory: /trunk/src/
======================
File [modified]: FuncAndJacobian.c
Delta lines: +4 -4
===================================================================
--- trunk/src/FuncAndJacobian.c 2010-05-24 17:50:00 UTC (rev 104)
+++ trunk/src/FuncAndJacobian.c 2010-05-24 19:21:50 UTC (rev 105)
@@ -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
===================================================================
--- trunk/src/TwoPunctures.c 2010-05-24 17:50:00 UTC (rev 104)
+++ trunk/src/TwoPunctures.c 2010-05-24 19:21:50 UTC (rev 105)
@@ -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
===================================================================
--- trunk/src/TwoPunctures.h 2010-05-24 17:50:00 UTC (rev 104)
+++ trunk/src/TwoPunctures.h 2010-05-24 19:21:50 UTC (rev 105)
@@ -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