[Users] SphericalHarmonicRecon and SphericalHarmonicReconGen

Frank Loeffler knarf at cct.lsu.edu
Thu Jul 13 10:33:39 CDT 2017


On Thu, Jul 13, 2017 at 11:29:12AM -0400, Yosef Zlochower wrote:
>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

If that is all, loc_q would be a location in zeta(:,1) where the real 
part is close to 1, and loc_p is a location in zeta(1,:) where the 
imaginary part is close to 1. In general, that wouldn't necessarily mean 
that at location zeta(loc_q,loc_p) any of the parts would be close to 1, 
let along both at the same time.

Frank

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20170713/41a8f9b9/attachment.bin 


More information about the Users mailing list