Questions about Streamlines, FlowControl, and FlatField.resample()

Hallo,

I have made some tests with vector and streamline visualization and got
some problems. So there are some questions.
FlowControl.setArrowScale() seem to have no affect on vector plot (works
with streamlines). If i change the value of Streamline density, via a
JSlider, sometimes the following error occur:

java.lang.ArrayIndexOutOfBoundsException: -1
         at visad.ShadowType.makeStreamline(ShadowType.java:2357)
         at
visad.java3d.ShadowTypeJ3D.makeStreamline(ShadowTypeJ3D.java:331)
         at
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2062)
         at
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
         at
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
         at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
         at visad.DisplayImpl.doAction(DisplayImpl.java:1689)
         at visad.ActionImpl.run(ActionImpl.java:353)
         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)

Display is a DisplayImplJ3D with a TwoDDisplayRenderer. If i change to a
DisplayImplJ2D, the result, when turning on Streamlines, is always the
following error:

java.lang.NullPointerException
         at visad.ShadowType.makeStreamline(ShadowType.java:2357)
         at
visad.java2d.ShadowTypeJ2D.makeStreamline(ShadowTypeJ2D.java:272)
         at
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2062)
         at
visad.java2d.ShadowFunctionOrSetTypeJ2D.doTransform(ShadowFunctionOrSetTypeJ2D.java:98)
         at
visad.java2d.DefaultRendererJ2D.doTransform(DefaultRendererJ2D.java:101)
         at visad.java2d.RendererJ2D.doAction(RendererJ2D.java:140)
         at visad.DisplayImpl.doAction(DisplayImpl.java:1689)
         at visad.java2d.DisplayImplJ2D.doAction(DisplayImplJ2D.java:312)
         at visad.ActionImpl.run(ActionImpl.java:353)
         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)

The test case is a Griided2DSet with 109x73 points.

The next problem occur if i try to visualize Streamlines on a cutplane
in 3D. I have adapted the example P6_09 from Ugo's tutorial. The 3D data
  are irregular (tetrahedra). error_in_cutplane.png show a screenshot
with streamlines turned off. In this example only two vector components
are used for the cutplane. Now, if i turn on streamlines VisAD produces
the following error:

java.lang.ArrayIndexOutOfBoundsException: -1
         at visad.ShadowType.makeStreamline(ShadowType.java:2357)
         at
visad.java3d.ShadowTypeJ3D.makeStreamline(ShadowTypeJ3D.java:331)
         at
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2062)
         at
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ3D.java:100)
         at
visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java:99)
         at visad.java3d.RendererJ3D.doAction(RendererJ3D.java:181)
         at visad.DisplayImpl.doAction(DisplayImpl.java:1689)
         at visad.ActionImpl.run(ActionImpl.java:353)
         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)

This error does not occur if the wrong vector components are used. This
means, if one vector is perpendicular to the plane (no streamlines can
be generated). The question is, should this work or is it impossible?
A general question is, are there any ranges for the different options of
FlowControl? Next i want to know, if there are any plans to extend the
streamline capabilities of VisAD? If not, then i have to implement it by
myself.
At least i have a little different question. The 3D example uses
FlatField.resample() to get the cutplane. If you look at
error_in_cutplane.png, there is a region left from the colored ball in
the middle with no vectors. To clarify the problem, i have to say
something about the data. This is a dataset from a CFD computation. The
flow arround a ball. within the ball are no points defined. Look at
Grid_of_cutplane_through_Ball.png. It shows a cut through the original
grid (unstructured hexahedra). The error with the missing regions only
occur if the cutplane goes through the empty region and is not the same
at every time. Sometimes this error is not there. Near the surface it is
different. There is always an error, regardless of the number of points
used for the plane (max. tryed 1000x1000). I have tryed all possible
options for resample(). No changes in output. The question is, if it is
a general problem of the resample algorithm with this kind of data.

Thanks

Olav

PNG image

PNG image

  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: