VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vtkCompositeInterpolatedVelocityField Class Referenceabstract

An abstract class for obtaining the interpolated velocity values at a point. More...

#include <vtkCompositeInterpolatedVelocityField.h>

Inheritance diagram for vtkCompositeInterpolatedVelocityField:
[legend]
Collaboration diagram for vtkCompositeInterpolatedVelocityField:
[legend]

Public Types

typedef vtkAbstractInterpolatedVelocityField Superclass
 
- Public Types inherited from vtkAbstractInterpolatedVelocityField
typedef vtkFunctionSet Superclass
 
- Public Types inherited from vtkFunctionSet
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkCompositeInterpolatedVelocityFieldNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void AddDataSet (vtkDataSet *dataset)=0
 
virtual int GetLastDataSetIndex ()
 
virtual vtkDataSetGetLastDataSet ()
 
- Public Member Functions inherited from vtkAbstractInterpolatedVelocityField
vtkAbstractInterpolatedVelocityFieldNewInstance () const
 
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 SetForceSurfaceTangentVector (bool)
 
virtual bool GetForceSurfaceTangentVector ()
 
virtual void SetSurfaceDataset (bool)
 
virtual bool GetSurfaceDataset ()
 
virtual void CopyParameters (vtkAbstractInterpolatedVelocityField *from)
 
int GetLastWeights (double *w)
 
int GetLastLocalCoordinates (double pcoords[3])
 
- Public Member Functions inherited from vtkFunctionSet
vtkFunctionSetNewInstance () const
 
virtual int GetNumberOfFunctions ()
 
virtual int GetNumberOfIndependentVariables ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkCompositeInterpolatedVelocityFieldSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractInterpolatedVelocityField
static int IsTypeOf (const char *type)
 
static vtkAbstractInterpolatedVelocityFieldSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkFunctionSet
static int IsTypeOf (const char *type)
 
static vtkFunctionSetSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkCompositeInterpolatedVelocityField ()
 
 ~vtkCompositeInterpolatedVelocityField ()
 
- Protected Member Functions inherited from vtkAbstractInterpolatedVelocityField
 vtkAbstractInterpolatedVelocityField ()
 
 ~vtkAbstractInterpolatedVelocityField ()
 
virtual int FunctionValues (vtkDataSet *ds, double *x, double *f)
 
virtual bool CheckPCoords (double pcoords[3])
 
virtual bool FindAndUpdateCell (vtkDataSet *ds, double *x)
 
virtual void SetVectorsSelection (const char *)
 
void FastCompute (vtkDataArray *vectors, double f[3])
 
bool InterpolatePoint (vtkPointData *outPD, vtkIdType outIndex)
 
vtkGenericCellGetLastCell ()
 
- Protected Member Functions inherited from vtkFunctionSet
 vtkFunctionSet ()
 
 ~vtkFunctionSet ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int LastDataSetIndex
 
vtkCompositeInterpolatedVelocityFieldDataSetsTypeDataSets
 
- Protected Attributes inherited from vtkAbstractInterpolatedVelocityField
int CacheHit
 
int CacheMiss
 
int WeightsSize
 
bool Caching
 
bool NormalizeVector
 
bool ForceSurfaceTangentVector
 
bool SurfaceDataset
 
int VectorsType
 
char * VectorsSelection
 
doubleWeights
 
double LastPCoords [3]
 
int LastSubId
 
vtkIdType LastCellId
 
vtkDataSetLastDataSet
 
vtkGenericCellCell
 
vtkGenericCellGenCell
 
- Protected Attributes inherited from vtkFunctionSet
int NumFuncs
 
int NumIndepVars
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Static Protected Attributes

static const double TOLERANCE_SCALE
 
- Static Protected Attributes inherited from vtkAbstractInterpolatedVelocityField
static const double TOLERANCE_SCALE
 
static const double SURFACE_TOLERANCE_SCALE
 

Detailed Description

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.

Warning
vtkCompositeInterpolatedVelocityField is not thread safe. A new instance should be created by each thread.
See also
vtkInterpolatedVelocityField vtkCellLocatorInterpolatedVelocityField vtkGenericInterpolatedVelocityField vtkCachingInterpolatedVelocityField vtkTemporalInterpolatedVelocityField vtkFunctionSet vtkStreamer vtkStreamTracer

Definition at line 84 of file vtkCompositeInterpolatedVelocityField.h.

Member Typedef Documentation

Definition at line 87 of file vtkCompositeInterpolatedVelocityField.h.

Constructor & Destructor Documentation

vtkCompositeInterpolatedVelocityField::vtkCompositeInterpolatedVelocityField ( )
protected
vtkCompositeInterpolatedVelocityField::~vtkCompositeInterpolatedVelocityField ( )
protected

Member Function Documentation

static int vtkCompositeInterpolatedVelocityField::IsTypeOf ( const char *  type)
static
virtual int vtkCompositeInterpolatedVelocityField::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAbstractInterpolatedVelocityField.

Reimplemented in vtkInterpolatedVelocityField, and vtkCellLocatorInterpolatedVelocityField.

static vtkCompositeInterpolatedVelocityField* vtkCompositeInterpolatedVelocityField::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkCompositeInterpolatedVelocityField::NewInstanceInternal ( ) const
protectedvirtual
vtkCompositeInterpolatedVelocityField* vtkCompositeInterpolatedVelocityField::NewInstance ( ) const
void vtkCompositeInterpolatedVelocityField::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkAbstractInterpolatedVelocityField.

Reimplemented in vtkInterpolatedVelocityField.

virtual int vtkCompositeInterpolatedVelocityField::GetLastDataSetIndex ( )
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 vtkDataSet* vtkCompositeInterpolatedVelocityField::GetLastDataSet ( )
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.

virtual void vtkCompositeInterpolatedVelocityField::AddDataSet ( vtkDataSet dataset)
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.

Member Data Documentation

const double vtkCompositeInterpolatedVelocityField::TOLERANCE_SCALE
staticprotected

Definition at line 113 of file vtkCompositeInterpolatedVelocityField.h.

int vtkCompositeInterpolatedVelocityField::LastDataSetIndex
protected

Definition at line 116 of file vtkCompositeInterpolatedVelocityField.h.

vtkCompositeInterpolatedVelocityFieldDataSetsType* vtkCompositeInterpolatedVelocityField::DataSets
protected

Definition at line 117 of file vtkCompositeInterpolatedVelocityField.h.


The documentation for this class was generated from the following file: