[vtkusers] Best way to store 3d requests and their results?

Guillaume Jacquenot guillaume.jacquenot at gmail.com
Fri Nov 2 13:35:37 EDT 2012


Dear all,

I have developped a C++ program that uses an instance of the VTK class
vtkInterpolatedVelocityField.
<http://www.vtk.org/doc/nightly/html/classvtkInterpolatedVelocityField.html>
Most of the time is spent obtaining the interpolated velocity values at
a point, which represents the bootleneck of my program.
I have noticed that some requests are performed several times.
I was wondering if I could store the requests performed and stored their
results.
Each time, a new request is done, I would check if it has not been
already evaluated, hoping that it will save some time.

To sum up, I need to store each request made, store the result provided
by vtkInterpolatedVelocityField
<http://www.vtk.org/doc/nightly/html/classvtkInterpolatedVelocityField.html>,
and search if a request was already made.

Is there any mechanism in vtk to do such a job?
I was thinking of stl map container to do so, with a specific compare
function working on an array of three doubles (x,y,z). (No time involved
in my problem)
Do you have advise to give me to deal with accuracy of the points.

Best regards
Guillaume Jacquenot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121102/a37a9b20/attachment.htm>


More information about the vtkusers mailing list