diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Analysis.c | 4 | ||||
-rw-r--r-- | src/CartToSphere.c | 19 |
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; } |