[vtkusers] vtkStreamTracer

Jeff Lee jeff at cdnorthamerica.com
Mon Apr 26 08:48:09 EDT 2004


James C. Robinson wrote:

>Gents,
>
>Many thanks for the continued interest. Goodwin, I am using the adaptive
>integrator. I will try the other two types as an experiment, but a big part
>of going to the vtkStreamTracer is to avail of the adaptive integrator, so
>it may indicate whether or not it is the issue, but will not resolve it.
>
>Jeff, the issue of being able to generate a set of streamtracers from a rake
>doesn't negate the possibility of having a method to interrogate it
>directly. The argument could point the vtkSTreamTracer to the seed particle
>for which one wants to determine the reason for termination - e.g.
>vtkStreamTracer::ReasonForTermination(int particlenumber).
>  
>
>Now, more information: I have discovered that the crash was due to the fact
>that
>vtkIntArray* ReasonForTermination =
>(vtkIntArray*)pStreamLine->GetOutput()->GetCellData()->GetArray("ReasonForTe
>rmination") ;
>
>was returning a NULL pointer (sometimes) and I was trying (naughty me) to
>use that pointer without checking for this condition. However, the question
>is now, why is the pointer coming back as NULL. I assume that it is because
>some condition is not met before it gets to the vtkStreamTracer::Integrate
>method (which is where "ReasonForTermination" is set up). The seed particle
>points that cause trouble are generally in zones where the flow rate is very
>low. In other areas the two ReasonForTermination messages that I am getting
>are either the stream tracer "generated and unexpected value" or exceeded
>the "max propagation time".
>  
>
more likely, the integration produced no streamlines for all seed 
particles, and hence the filter did not add the ReasonForTermination 
array to the output.  Try setting DebugOn() on the StreamTracer for more 
feedback.  Do you get similar behavior when using the non-adaptive 
integrators rk2, rk4?  Also, when you get "Unexpected Value", you should 
try either using a larger tolerance or set the minimum step size to a 
larger value.   Increasing MaxPropagation will allow streamlines to 
continue further.  Can you at least give your pipeline and filter settings?
-Jeff

>Again many thanks.
>
>Regards,
>
>Jim
>
>______________________
>
>James C. Robinson, PhD,
>Chartered Engineer,
>Kepler Simulation Systems Ltd.,
>42 Rivergrove,
>Glanmire, Co. Cork,
>Eire
>
>Tel:         +353-21-4822028
>Tel:         +353-87-2393010
>Fax:        +353-21-4822028
>E-mail:     j.robinson at kepler-systems.com
>______________________
>
>-----Original Message-----
>From: Goodwin Lawlor [mailto:goodwin.lawlor at ucd.ie]
>Sent: 26 April 2004 12:00
>To: j.robinson at kepler-systems.com
>Subject: RE: [vtkusers] vtkStreamTracer
>
>Hi Jim,
>
>Which integrator are you using? If its vtkRungeKutta45 try using
>vtkRungeKutta4 and see if vtkStreamTracer still crashes where the flow
>rate is close to zero. If this solves the problem then it's the adaptive
>time step causing the problem...
>
>Regards,
>
>Goodwin
>
>Ps Actually try each of the integrators and see if they make a
>difference.
>
>-----Original Message-----
>From: James C. Robinson [mailto:j.robinson at kepler-systems.com]
>Sent: 26 April 2004 10:07
>To: goodwin.lawlor at ucd.ie; Jeff Lee
>Cc: Vtk Users
>Subject: RE: [vtkusers] vtkStreamTracer
>
>
>Gents,
>
>Thanks for your efforts. You have confirmed what I did myself is
>reasonable (Note, for all those harping on about the manual.... Where is
>the syntax for accessing that array explicitly stated in the manual? One
>would think that, since the reason for termination is a kernel part of
>the object, there would be a simple method to interrogate the object
>such as a vtkStreamTracer::ReasonForTermination()).
>
>You may have more contributions to make. I am finding two main problems
>(and a crash) with the vtkStreamTracer object:
>1) The streamtube generated is not as long as the one attained using
>vtkStreamLine,
>2)  There is a crash when I use a source point where the flow rate is
>close to (or equal to) zero.
>
>Any ideas?
>
>Regards,
>
>Jim
>PS: Again, for those saying "give us some example code...". My programme
>is written as an MFC View/Doc with a very structured list of methods for
>newing, creating (setting up) and deleting all the objects that I use.
>It would be an arduous (though perhaps fruitful and worthwhile)
>procedure to extract all the objects and use them in the same way as I
>use them in the overall programme.
>
>
>______________________
>
>James C. Robinson, PhD,
>Chartered Engineer,
>Kepler Simulation Systems Ltd.,
>42 Rivergrove,
>Glanmire, Co. Cork,
>Eire
>
>Tel:         +353-21-4822028
>Tel:         +353-87-2393010
>Fax:        +353-21-4822028
>E-mail:     j.robinson at kepler-systems.com
>______________________
>
>-----Original Message-----
>From: Goodwin Lawlor [mailto:goodwin.lawlor at ucd.ie]
>Sent: 25 April 2004 13:05
>To: vtkusers at vtk.org
>Cc: j.robinson at kepler-systems.com
>Subject: RE: [vtkusers] vtkStreamTracer
>
>Hi Jim
>
>Tracer->GetOutput()->GetCellData()->GetArray("ReasonForTermination");
>
>Hth,
>
>Goodwin
>
>Message: 3
>Reply-To: <j.robinson at kepler-systems.com>
>From: "James C. Robinson" <j.robinson at kepler-systems.com>
>To: "Vtk Users" <vtkusers at vtk.org>
>Date: Sat, 24 Apr 2004 20:50:06 +0100
>Subject: [vtkusers] vtkStreamTracer
>
>Dear All,
>
>In vtkStreamTracer:
>
>The reason for the termination is stored in a cell array named
>ReasonForTermination.
>
>How do I access it? (I am probably tired and slow at the moment).
>
>Thanks,
>
>Jim
>
>______________________
>
>James C. Robinson, PhD,
>Chartered Engineer,
>Kepler Simulation Systems Ltd.,
>42 Rivergrove,
>Glanmire, Co. Cork,
>Eire
>
>Tel:         +353-21-4822028
>Tel:         +353-87-2393010
>Fax:        +353-21-4822028
>E-mail:     j.robinson at kepler-systems.com
>______________________
>
>
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>  
>



More information about the vtkusers mailing list