[Users] SphericalHarmonicRecon and SphericalHarmonicReconGen
Yosef Zlochower
yosef at astro.rit.edu
Thu Jul 13 10:29:12 CDT 2017
On 07/13/2017 11:25 AM, Frank Loeffler wrote:
> On Thu, Jul 13, 2017 at 11:14:00AM -0400, Yosef Zlochower wrote:
>> if (minval(abs(zeta - dcmplx(1,1))) < 1.0d-10) then
>> Tarr = minloc(abs(stereo_q(:,1)-1.))
>> loc_q = Tarr(1)
>> Tarr = minloc(abs(stereo_p(1,:)-1.))
>> loc_p = Tarr(1)
>> if (abs(zeta(loc_q,loc_p) - dcmplx(1.,1.)) .gt. 1d-10) then
>> call CCTK_WARN(0, " Error ")
>> endif
>>
>> endif
>> or one complex one (zeta). With zeta = q + i * p. The code is checking
>> that if zeta == 1+i anywhere, that it is equal to 1 + i at the point
>> where q=1 and p=1.
>
> I don't quite understand something about that code. It looks for a
> location where q is closest to 1, and one where p is closest to i:
>
> minloc(abs(stereo_q(:,1)-1.))
> minloc(abs(stereo_p(1,:)-1.))
>
> It then assumes the respective 'other' coordinate is the one it should
> be looking at:
>
> zeta(loc_q,loc_p)
>
> Is this really always the case (could be, if this comes from some kind
> of known grid setup, but this is not apparent from the code).
>
I don't understand the test either, but it should be the case that
dble(zeta) = stereo_q
and dimag(zeta) = stereo_p
zeta is initialized as zeta = dcmplx(stereo_q,stereo_p)
in pittnullcode/NullGrid/src/NullGrid_InitCoord.F90
> Frank
>
More information about the Users
mailing list