[vtkusers] vtkStreamTracer
Jeff Lee
jeff at cdnorthamerica.com
Mon Apr 26 07:45:48 EDT 2004
Hi James,
James C. Robinson wrote:
>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?
>
Although much has changed unless you are reading the latest manual, the
basic idea is this: vtkDataSet has an instance of
vtkDataSetAttributes(a subclass of vtkFieldData) which represents
PointData(data stored at points) and also one which represents
CellData(data stored at cells). To access the attribute data in a
dataset, the syntax is dataset->GetPointData() or
dataset->GetCellData(), or for field data, dataset->GetFieldData().
Once you have this instance of vtkDataSetAttributes, you can access
arrays either by name or index (or by classification of scalars,
vectors, tensors, etc...) as you did in your example.
>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()).
>
>
Reason for termination is per-streamline (or per-seed particle). So
when populating vtkStreamTracer with a rake, each point in the rake has
a reason for termination.
>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,
>
>
The likely reason that your streamline is not as long as when using
vtkStreamLine is that the integration step-size and other parameters are
different. This is where a simple example or pieces of code would be
useful. Initially, you might try changing the initial integration
step-size or the maximum propagation.
>2) There is a crash when I use a source point where the flow rate is close
>to (or equal to) zero.
>
There is a bug in vtkStreamTracer that I have fixed locally, but haven't
checked in that would account for the crash when speed is zero. You can
avoid the crash temporarily by setting ComputeVorticityOff in your
StreamTracer object. I will check in a fix asap into cvs. Thanks for
the bug report. If ComputeVorticityOff doesn't work for you, it would
be helpful for you to try and cobble up an example that duplicates the
problem.
-Jeff
>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