FreeMat
vtkGenericInterpolatedVelocityField

Section: Visualization Toolkit Filtering Classes

Usage

vtkGenericInterpolatedVelocityField acts as a continuous velocity field by performing cell interpolation on the underlying vtkDataSet. This is a concrete sub-class of vtkFunctionSet with NumberOfIndependentVariables = 4 (x,y,z,t) and NumberOfFunctions = 3 (u,v,w). Normally, every time an evaluation is performed, the cell which contains the point (x,y,z) has to be found by calling FindCell. This is a computationally expansive operation. In certain cases, the cell search can be avoided or shortened by providing a guess for the cell iterator. For example, in streamline integration, the next evaluation is usually in the same or a neighbour cell. For this reason, vtkGenericInterpolatedVelocityField stores the last cell iterator. If caching is turned on, it uses this iterator as the starting point.

To create an instance of class vtkGenericInterpolatedVelocityField, simply invoke its constructor as follows

  obj = vtkGenericInterpolatedVelocityField

Methods

The class vtkGenericInterpolatedVelocityField has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkGenericInterpolatedVelocityField class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkGenericInterpolatedVelocityField = obj.NewInstance ()
  • vtkGenericInterpolatedVelocityField = obj.SafeDownCast (vtkObject o)
  • int = obj.FunctionValues (double x, double f) - Evaluate the velocity field, f, at (x, y, z, t). For now, t is ignored.
  • obj.AddDataSet (vtkGenericDataSet dataset) - Add a dataset used for the implicit function evaluation. If more than one dataset is added, the evaluation point is searched in all until a match is found. THIS FUNCTION DOES NOT CHANGE THE REFERENCE COUNT OF dataset FOR THREAD SAFETY REASONS.
  • obj.ClearLastCell () - Set the last cell id to -1 so that the next search does not start from the previous cell
  • vtkGenericAdaptorCell = obj.GetLastCell () - Return the cell cached from last evaluation.
  • int = obj.GetLastLocalCoordinates (double pcoords[3]) - Returns the interpolation weights cached from last evaluation if the cached cell is valid (returns 1). Otherwise, it does not change w and returns 0.
  • int = obj.GetCaching () - Turn caching on/off.
  • obj.SetCaching (int ) - Turn caching on/off.
  • obj.CachingOn () - Turn caching on/off.
  • obj.CachingOff () - Turn caching on/off.
  • int = obj.GetCacheHit () - Caching statistics.
  • int = obj.GetCacheMiss () - Caching statistics.
  • string = obj.GetVectorsSelection () - If you want to work with an arbitrary vector array, then set its name here. By default this in NULL and the filter will use the active vector array.
  • obj.SelectVectors (string fieldName) - Returns the last dataset that was visited. Can be used as a first guess as to where the next point will be as well as to avoid searching through all datasets to get more information about the point.
  • vtkGenericDataSet = obj.GetLastDataSet () - Returns the last dataset that was visited. Can be used as a first guess as to where the next point will be as well as to avoid searching through all datasets to get more information about the point.
  • obj.CopyParameters (vtkGenericInterpolatedVelocityField from) - Copy the user set parameters from source. This copies the Caching parameters. Sub-classes can add more after chaining.