diff options
-rw-r--r-- | param.ccl | 5 | ||||
-rw-r--r-- | src/sphericalharmonic.cc | 10 |
2 files changed, 14 insertions, 1 deletions
@@ -94,6 +94,11 @@ CCTK_INT test_sw "which spin weight to put into the test variables" * :: "Any integer" } -2 +CCTK_BOOLEAN test_mode_proportional_to_r "whether the test spherical harmonic coefficient is proportional to the radial coordinate" +{ +} "no" + + # This parameter is deprecated and is no longer used KEYWORD mode_type "Which type of mode extraction do we have" STEERABLE=always { diff --git a/src/sphericalharmonic.cc b/src/sphericalharmonic.cc index 116613c..949d261 100644 --- a/src/sphericalharmonic.cc +++ b/src/sphericalharmonic.cc @@ -88,8 +88,16 @@ extern "C" void Multipole_SetHarmonic(CCTK_ARGUMENTS) CCTK_REAL theta = acos(z[index]/r[index]); CCTK_REAL phi = atan2(y[index],x[index]); + CCTK_REAL re = 0; + CCTK_REAL im = 0; + Multipole_SphericalHarmonic(test_sw,test_l,test_m,theta,phi, - &harmonic_re[index], &harmonic_im[index]); + &re, &im); + + CCTK_REAL fac = test_mode_proportional_to_r ? r[index] : 1.0; + + harmonic_re[index] = re * fac; + harmonic_im[index] = im * fac; } } } |