SCIInstitute / SCIRun

SCIRun is a Problem Solving Environment, for modeling, simulation and visualization of scientific problems. This is version 5, the upgraded version of SCIRun v4.
http://scirun.org
Other
128 stars 72 forks source link

Streamline Distance from Seed does not compute geodesic accurately #1877

Closed wgood closed 5 years ago

wgood commented 5 years ago

Using Test Network: -there is a network and an input file.

'Distance from seed' should sum the inter-node distances along the streamline with the final node having a value equal to the value given for that streamline if the 'Streamline Length' option is selected. Presumably, streamline length is the total geodesic length, but even if it is euclidean we wouldnt expect that the geodesic would report a value a magnitude higher (85 versus 3500 mm).

I expect it is summing inter-node distance up to each point and then adding it to the sum of the previous node rather than calculating the inter-node between the previous point and itself and adding that to the previous geodesic. Streamline_Tester.zip

Versions

Running on Yosemite.

Version#: v5.0-beta.IBBM2018rc2 (a little outdated but problem is still probably valid)

wgood commented 5 years ago

Went in and manually calculated and geodesics per streamline and the values agree with 'Streamline Length', so that value is seemingly correct

dcwhite commented 5 years ago

Yes, the code is reusing the same variable for the different types of lengths this module computes, and mistakenly added the internode length on top of the precomputed total length. Should be easy fix.

dcwhite commented 5 years ago

I found another problem when running with just one seed point. I'll need to track that down too.

dcwhite commented 5 years ago

I believe I have fixed the distance-from-seed computation, but the problem with the first seed point going haywire is screwing up the min/max result of distance from seed when comparing the output of ReportFieldInfo. I'll need to debug this more next week.

dcwhite commented 5 years ago

danSL.zip