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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/sphericalharmonic.cc | 10 |
1 files changed, 9 insertions, 1 deletions
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; } } } |