diff options
author | hinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843> | 2010-06-14 06:12:17 +0000 |
---|---|---|
committer | hinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843> | 2010-06-14 06:12:17 +0000 |
commit | 712ecb7be4750776368ec51bed63eed272137afc (patch) | |
tree | 2feac90464d567a558aedb18cbb252231afb32be | |
parent | e632c0eacc3293d050aba4484f71dc3b12e3184b (diff) |
Add testing code for making grid function harmonic coefficient proportional to radius
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Multipole/trunk@58 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843
-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; } } } |