Bob,

I thoroughly looked through your patch here and agree that something should be done. Would you be willing to write up the paragraph to add to the documentation if I add a new option to allow the override in the module? What do you think the option name should be and should it just be a flag (true/false)?

David


In streamline.c there is a condition for stopping the trace if the data vector
has zero magnitude or if the dot product between the data vector at the
current step and the next step is < -0.0:

if (ZeroVector(v1, nDim) || VectorDot(v0, v1, nDim) < -0.0)

The documentation for the Streamline module should be changed so the user
knows that there are stopping conditions besides the one for the maximum
number of steps.

Besides correcting the documentation, I think one of two changes discussed
below should be made to the Streamline Module:
(1) Stop conditions only generate a warning
(2) Streamline module has an option for diabling the stop conditions.

The stop conditions can cause problems in the application when we want to know
if a magnetic field line trace started in the northern hemisphere will end in
the southern hemisphere of Earth (or more generally if a field line started
at a point in space will intersect a region on Earth).
For example, one of the field lines in
http://lasp.colorado.edu/~weigel/StreamLineProblem/StreamLineProblem_ex2.png
terminates in a location where other field lines are magnetically connected to
Earth; this behavior creates many problems in our analysis and working around
it is quite messy.

The attached patch changes the VectorDot condition so that only a warning is
generated if VectorDot(v0, v1, nDim) < -0.0.
Instead of a warning, should the streamline module have an input where the
user can specify if VectorDot(v0, v1, nDim) < -0.0 is a stop condition?
As an argument for keeping the original stop conditions, compare what happens
with and without the proposed patch for a poorly chosen grid:

http://lasp.colorado.edu/~weigel/StreamLineProblem/StreamLineProblem_ex1.png

and with the patch

http://lasp.colorado.edu/~weigel/StreamLineProblem/StreamLineProblem_ex1_withfix.png

(The images were generated with the code in the .tgz at
http://lasp.colorado.edu/~weigel/StreamLineProblem/)



Attachment converted: MacOSX:dx-4.3.2-noarch-patch (TEXT/R*ch) (000F8D7C)


--
.............................................................................
David L. Thompson                   Visualization and Imagery Solutions, Inc.
mailto:[EMAIL PROTECTED]    5515 Skyway Drive, Missoula, MT 59804
                                    Phone : (406)756-7472

Reply via email to