VTK
|
An abstract class for obtaining the interpolated velocity values at a point. More...
#include <vtkCompositeInterpolatedVelocityField.h>
Public Types | |
typedef vtkAbstractInterpolatedVelocityField | Superclass |
![]() | |
typedef vtkFunctionSet | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkCompositeInterpolatedVelocityField * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | AddDataSet (vtkDataSet *dataset)=0 |
virtual int | GetLastDataSetIndex () |
virtual vtkDataSet * | GetLastDataSet () |
![]() | |
vtkAbstractInterpolatedVelocityField * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetLastCellId (vtkIdType c, int dataindex)=0 |
void | SelectVectors (int fieldAssociation, const char *fieldName) |
virtual int | FunctionValues (double *x, double *f)=0 |
void | ClearLastCellId () |
virtual void | SetCaching (bool) |
virtual bool | GetCaching () |
virtual int | GetCacheHit () |
virtual int | GetCacheMiss () |
virtual vtkIdType | GetLastCellId () |
virtual void | SetLastCellId (vtkIdType c) |
virtual char * | GetVectorsSelection () |
virtual int | GetVectorsType () |
virtual void | SetNormalizeVector (bool) |
virtual bool | GetNormalizeVector () |
virtual void | CopyParameters (vtkAbstractInterpolatedVelocityField *from) |
int | GetLastWeights (double *w) |
int | GetLastLocalCoordinates (double pcoords[3]) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCompositeInterpolatedVelocityField * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkAbstractInterpolatedVelocityField * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkCompositeInterpolatedVelocityField () | |
~vtkCompositeInterpolatedVelocityField () | |
![]() | |
vtkAbstractInterpolatedVelocityField () | |
~vtkAbstractInterpolatedVelocityField () | |
virtual int | FunctionValues (vtkDataSet *ds, double *x, double *f) |
virtual void | SetVectorsSelection (const char *) |
void | FastCompute (vtkDataArray *vectors, double f[3]) |
bool | InterpolatePoint (vtkPointData *outPD, vtkIdType outIndex) |
vtkGenericCell * | GetLastCell () |
Protected Attributes | |
int | LastDataSetIndex |
vtkCompositeInterpolatedVelocityFieldDataSetsType * | DataSets |
![]() | |
int | CacheHit |
int | CacheMiss |
int | WeightsSize |
bool | Caching |
bool | NormalizeVector |
int | VectorsType |
char * | VectorsSelection |
double * | Weights |
double | LastPCoords [3] |
vtkIdType | LastCellId |
vtkDataSet * | LastDataSet |
vtkGenericCell * | Cell |
vtkGenericCell * | GenCell |
Static Protected Attributes | |
static const double | TOLERANCE_SCALE |
![]() | |
static const double | TOLERANCE_SCALE |
An abstract class for obtaining the interpolated velocity values at a point.
vtkCompositeInterpolatedVelocityField acts as a continuous velocity field by performing cell interpolation on the underlying vtkDataSet. This is an abstract sub-class of vtkFunctionSet, NumberOfIndependentVariables = 4 (x,y,z,t) and NumberOfFunctions = 3 (u,v,w). With a brute-force scheme, every time an evaluation is performed, the target cell containing point (x,y,z) needs to be found by calling FindCell(), via either vtkDataSet or vtkAbstractCelllocator's sub-classes (vtkCellLocator & vtkModifiedBSPTree). As it incurs a large cost, one (for vtkCellLocatorInterpolatedVelocityField via vtkAbstractCellLocator) or two (for vtkInterpolatedVelocityField via vtkDataSet that involves vtkPointLocator in addressing vtkPointSet) levels of cell caching may be exploited to increase the performance.
For vtkInterpolatedVelocityField, level #0 begins with intra-cell caching. Specifically if the previous cell is valid and the next point is still in it ( i.e., vtkCell::EvaluatePosition() returns 1, coupled with newly created parametric coordinates & weights ), the function values can be interpolated and only vtkCell::EvaluatePosition() is invoked. If this fails, then level #1 follows by inter-cell search for the target cell that contains the next point. By an inter-cell search, the previous cell provides an important clue or serves as an immediate neighbor to aid in locating the target cell via vtkPointSet:: FindCell(). If this still fails, a global cell location / search is invoked via vtkPointSet::FindCell(). Here regardless of either inter-cell or global search, vtkPointLocator is in fact employed (for datasets of type vtkPointSet only, note vtkImageData and vtkRectilinearGrid are able to provide rapid and robust cell location due to the simple mesh topology) as a crucial tool underlying the cell locator. However, the use of vtkPointLocator makes vtkInterpolatedVelocityField non-robust in cell location for vtkPointSet.
For vtkCellLocatorInterpolatedVelocityField, the only caching (level #0) works by intra-cell trial. In case of failure, a global search for the target cell is invoked via vtkAbstractCellLocator::FindCell() and the actual work is done by either vtkCellLocator or vtkModifiedBSPTree (for datasets of type vtkPointSet only, while vtkImageData and vtkRectilinearGrid themselves are able to provide fast robust cell location). Without the involvement of vtkPointLocator, robust cell location is achieved for vtkPointSet.
Definition at line 84 of file vtkCompositeInterpolatedVelocityField.h.
Definition at line 87 of file vtkCompositeInterpolatedVelocityField.h.
|
protected |
|
protected |
|
static |
|
virtual |
Reimplemented from vtkAbstractInterpolatedVelocityField.
Reimplemented in vtkInterpolatedVelocityField, and vtkCellLocatorInterpolatedVelocityField.
|
static |
|
protectedvirtual |
Reimplemented from vtkAbstractInterpolatedVelocityField.
Reimplemented in vtkInterpolatedVelocityField, and vtkCellLocatorInterpolatedVelocityField.
vtkCompositeInterpolatedVelocityField* vtkCompositeInterpolatedVelocityField::NewInstance | ( | ) | const |
void vtkCompositeInterpolatedVelocityField::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
virtual |
Get the most recently visited dataset and it id. The dataset is used for a guess regarding where the next point will be, without searching through all datasets. When setting the last dataset, care is needed as no reference counting or checks are performed. This feature is intended for custom interpolators only that cache datasets independently.
|
virtual |
Get the most recently visited dataset and it id. The dataset is used for a guess regarding where the next point will be, without searching through all datasets. When setting the last dataset, care is needed as no reference counting or checks are performed. This feature is intended for custom interpolators only that cache datasets independently.
Reimplemented from vtkAbstractInterpolatedVelocityField.
|
pure virtual |
Add a dataset for implicit velocity 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.
Implemented in vtkCellLocatorInterpolatedVelocityField, and vtkInterpolatedVelocityField.
|
staticprotected |
Definition at line 113 of file vtkCompositeInterpolatedVelocityField.h.
|
protected |
Definition at line 116 of file vtkCompositeInterpolatedVelocityField.h.
|
protected |
Definition at line 117 of file vtkCompositeInterpolatedVelocityField.h.