EyNuel / cTraceo

An Underwater Acoustic Raytracing Model. Check our wiki for more information
http://eynuel.github.com/cTraceo/
Other
11 stars 7 forks source link

Refraction point structures not filled-in corectly #28

Closed ronan777 closed 11 years ago

ronan777 commented 11 years ago

Using stable version 1.3 The structures eigenrays.eigenray(n).refrac_r and eigenrays.eigenray(n).refrac_z do not seem to be filled-in correctly. In an example I ran where 11 eigenrays were found to the receiver, the structures were filled for ray number 1 only and were the wrong ones, corresponding to ray number 11. It seems that what happens is that the correct refraction points for the last ray are filed in only in the structure for the first ray.

bug

ronan777 commented 11 years ago

Just one precision. The figure shows the 1th ray and the refraction points for the 1 ray. No other eignray had any refraction point listed.

EyNuel commented 11 years ago

Thanks for reporting! could you attach a .in file to reproduce this?

ronan777 commented 11 years ago

T hanks for the fast answer. Please find the attached input file.

-- Ronan Le Bras

On Fri, Apr 5, 2013 at 12:32 PM, Emanuel Ey notifications@github.comwrote:

Thanks for reporting! could you attach a .in file to reproduce this?

— Reply to this email directly or view it on GitHubhttps://github.com/EyNuel/cTraceo/issues/28#issuecomment-15948862 .

EyNuel commented 11 years ago

No file attached...

ronan777 commented 11 years ago

Sorry I'm new to github. It did not accept the attachment. Only graphics files. I attached to the email. I'l try to attach to github report.

-- Ronan Le Bras

On Fri, Apr 5, 2013 at 4:29 PM, Emanuel Ey notifications@github.com wrote:

No file attached...

— Reply to this email directly or view it on GitHubhttps://github.com/EyNuel/cTraceo/issues/28#issuecomment-15958754 .

EyNuel commented 11 years ago

Just to sum up: Ronan has found this bug in version 1.3, on both windows and linux (Centos 64b). I have been able to reproduce it with output option ERF [Eigenrays by Regula Falsi], but not with EPR [Eigenrays by Proximiy]. Tested this with both GCC 4.4.7 and Clang 3.0.

Result obtained with EPR [correct]: siplab_results

Result obtained with ERF [incorrect]: ronan_results

Note that in the ERF results, only the refraction points for one of the rays are plotted.

Results generated with the following matlab code:

load eig.mat
figure; hold on 
for iRay=1:eigenrays.nEigenrays
    plot(eigenrays.eigenray(iRay).r, eigenrays.eigenray(iRay).z, 'k')

    %plot it's refraction points as listed by cTraceo:
    for i=1:eigenrays.eigenray(iRay).nRefrac
        plot(eigenrays.eigenray(iRay).refrac_r(i), eigenrays.eigenray(iRay).refrac_z(i), 'ro');
    end
end