aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorallen <allen@80bd93c7-81bc-453a-9e3f-619c0b4f6fe4>2002-05-05 13:10:52 +0000
committerallen <allen@80bd93c7-81bc-453a-9e3f-619c0b4f6fe4>2002-05-05 13:10:52 +0000
commitae7cd18ee7320e3163d4936e3f9c7db547348ee9 (patch)
treeca7a004246ab5d6d779e250ead3d26af5eed9de5 /src
parente108c3b006bd12a5ff0c521965aef104fdb5e391 (diff)
Added more documentation.
Removed a bug in the CartSphere transformation (for r,phi) Changed the name of the parameter r2squaredsomething to normalize_dtheta_dphi for a better description of what it does, also made the default no, so that by default the components are normalised to the vector (dtheta, dphi), which seems to be what people would expect. This might mean rerunning some testsuites git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMAnalysis/trunk@5 80bd93c7-81bc-453a-9e3f-619c0b4f6fe4
Diffstat (limited to 'src')
-rw-r--r--src/Analysis.c4
-rw-r--r--src/CartToSphere.c19
2 files changed, 12 insertions, 11 deletions
diff --git a/src/Analysis.c b/src/Analysis.c
index c962ba4..d4ad471 100644
--- a/src/Analysis.c
+++ b/src/Analysis.c
@@ -119,7 +119,7 @@ void ADMAnalysis_MetricCartToSphere(CCTK_ARGUMENTS)
DECLARE_CCTK_PARAMETERS;
ADMAnalysis_CartToSphere(cctk_lsh,
- rsquared_in_sphm,
+ normalize_dtheta_dphi,
x,
y,
z,
@@ -159,7 +159,7 @@ void ADMAnalysis_CurvCartToSphere(CCTK_ARGUMENTS)
DECLARE_CCTK_PARAMETERS;
ADMAnalysis_CartToSphere(cctk_lsh,
- rsquared_in_sphm,
+ normalize_dtheta_dphi,
x,
y,
z,
diff --git a/src/CartToSphere.c b/src/CartToSphere.c
index 00d074a..e5e674f 100644
--- a/src/CartToSphere.c
+++ b/src/CartToSphere.c
@@ -64,8 +64,9 @@ CCTK_FILEVERSION(CactusEinstein_ADMAnalysis_CartToSphere_c)
@vdesc the local shape of the grid
@vtype const int *
@vio in
- @var r2norm
- @vdesc a flag which is set if the radius variable shouldbe squared
+ @var project_rdtheta_rdphi
+ @vdesc If set project angular components onto r*dtheta and
+ r*sin(theta)*dphi instead of dtheta and dphi
@vtype int
@vio in
@var x
@@ -135,7 +136,7 @@ CCTK_FILEVERSION(CactusEinstein_ADMAnalysis_CartToSphere_c)
@@*/
void ADMAnalysis_CartToSphere(const CCTK_INT *lsh,
- int r2norm,
+ int project_rdtheta_rdphi,
const CCTK_REAL *x,
const CCTK_REAL *y,
const CCTK_REAL *z,
@@ -215,7 +216,7 @@ void ADMAnalysis_CartToSphere(const CCTK_INT *lsh,
2*cosp*SQR(cost)*txy*sinp
+SQR(cosp)*SQR(cost)*txx);
- if (r2norm)
+ if (!project_rdtheta_rdphi)
{
sphere_qq[i] *= SQR(r[i]);
}
@@ -225,7 +226,7 @@ void ADMAnalysis_CartToSphere(const CCTK_INT *lsh,
2*cosp*txy*sinp+
SQR(cosp)*tyy);
- if (r2norm)
+ if (!project_rdtheta_rdphi)
{
sphere_pp[i] *= SQR(r[i]) * SQR(sint);
}
@@ -238,9 +239,9 @@ void ADMAnalysis_CartToSphere(const CCTK_INT *lsh,
2*SQR(cost)*tyz*sinp-
tyz*sinp+
2*cosp*SQR(cost)*txz-
- cosp*txz)*r[i];
+ cosp*txz);
- if (r2norm)
+ if (!project_rdtheta_rdphi)
{
sphere_rq[i] *= r[i];
}
@@ -251,7 +252,7 @@ void ADMAnalysis_CartToSphere(const CCTK_INT *lsh,
SQR(cosp)*txy)*sint-
cost*txz*sinp+cosp*cost*tyz);
- if (r2norm)
+ if (!project_rdtheta_rdphi)
{
sphere_rp[i] *= r[i] * sint;
}
@@ -261,7 +262,7 @@ void ADMAnalysis_CartToSphere(const CCTK_INT *lsh,
cost*(-txy*SQR(sinp)+
cosp*(tyy-txx)*sinp+SQR(cosp)*txy));
- if (r2norm)
+ if (!project_rdtheta_rdphi)
{
sphere_qp[i] *= SQR(r[i]) * sint;
}