VTK
|
An abstract class for obtaining the interpolated velocity values at a point. More...
#include <vtkAbstractInterpolatedVelocityField.h>
Public Types | |
typedef vtkFunctionSet | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkAbstractInterpolatedVelocityField * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkDataSet * | GetLastDataSet () |
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]) |
![]() | |
vtkFunctionSet * | NewInstance () const |
virtual int | GetNumberOfFunctions () |
virtual int | GetNumberOfIndependentVariables () |
![]() | |
vtkObject * | NewInstance () 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) |
vtkCommand * | GetCommand (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) |
![]() | |
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 vtkAbstractInterpolatedVelocityField * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkFunctionSet * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Attributes | |
int | CacheHit |
int | CacheMiss |
int | WeightsSize |
bool | Caching |
bool | NormalizeVector |
bool | ForceSurfaceTangentVector |
bool | SurfaceDataset |
int | VectorsType |
char * | VectorsSelection |
double * | Weights |
double | LastPCoords [3] |
int | LastSubId |
vtkIdType | LastCellId |
vtkDataSet * | LastDataSet |
vtkGenericCell * | Cell |
vtkGenericCell * | GenCell |
![]() | |
int | NumFuncs |
int | NumIndepVars |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Static Protected Attributes | |
static const double | TOLERANCE_SCALE |
static const double | SURFACE_TOLERANCE_SCALE |
Friends | |
class | vtkTemporalInterpolatedVelocityField |
An abstract class for obtaining the interpolated velocity values at a point.
vtkAbstractInterpolatedVelocityField 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 vtkAbstractInterpolatedVelocityField.h.
Definition at line 87 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
|
protected |
|
static |
|
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 vtkFunctionSet.
Reimplemented in vtkCompositeInterpolatedVelocityField, vtkInterpolatedVelocityField, vtkCellLocatorInterpolatedVelocityField, and vtkAMRInterpolatedVelocityField.
|
static |
|
protectedvirtual |
Reimplemented from vtkFunctionSet.
Reimplemented in vtkCompositeInterpolatedVelocityField, vtkInterpolatedVelocityField, vtkCellLocatorInterpolatedVelocityField, and vtkAMRInterpolatedVelocityField.
vtkAbstractInterpolatedVelocityField* vtkAbstractInterpolatedVelocityField::NewInstance | ( | ) | const |
|
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 vtkFunctionSet.
Reimplemented in vtkCompositeInterpolatedVelocityField, vtkAMRInterpolatedVelocityField, vtkInterpolatedVelocityField, and vtkCellLocatorInterpolatedVelocityField.
|
virtual |
Set/Get the caching flag. If this flag is turned ON, there are two levels of caching for derived concrete class vtkInterpolatedVelocityField and one level of caching for derived concrete class vtkCellLocatorInterpolatedVelocityField. Otherwise a global cell location is always invoked for evaluating the function values at any point.
|
virtual |
Set/Get the caching flag. If this flag is turned ON, there are two levels of caching for derived concrete class vtkInterpolatedVelocityField and one level of caching for derived concrete class vtkCellLocatorInterpolatedVelocityField. Otherwise a global cell location is always invoked for evaluating the function values at any point.
|
virtual |
Get the caching statistics. CacheHit refers to the number of level #0 cache hits while CacheMiss is the number of level #0 cache misses.
|
virtual |
Get the caching statistics. CacheHit refers to the number of level #0 cache hits while CacheMiss is the number of level #0 cache misses.
|
virtual |
Reimplemented in vtkCompositeInterpolatedVelocityField.
|
virtual |
Get/Set the id of the cell cached from last evaluation.
|
inlinevirtual |
Get/Set the id of the cell cached from last evaluation.
Reimplemented in vtkCellLocatorInterpolatedVelocityField, vtkInterpolatedVelocityField, and vtkAMRInterpolatedVelocityField.
Definition at line 113 of file vtkAbstractInterpolatedVelocityField.h.
|
pure virtual |
Set the id of the most recently visited cell of a dataset.
Implemented in vtkCellLocatorInterpolatedVelocityField, vtkInterpolatedVelocityField, and vtkAMRInterpolatedVelocityField.
|
virtual |
Get/Set the name of a spcified vector array. By default it is NULL, with the active vector array for use.
|
virtual |
Get/Set the name of a spcified vector array. By default it is NULL, with the active vector array for use.
void vtkAbstractInterpolatedVelocityField::SelectVectors | ( | int | fieldAssociation, |
const char * | fieldName | ||
) |
the association type (see vtkDataObject::FieldAssociations) and the name of the velocity data field
|
virtual |
Set/Get the flag indicating vector post-normalization (following vector interpolation). Vector post-normalization is required to avoid the 'curve-overshooting' problem (caused by high velocity magnitude) that occurs when Cell-Length is used as the step size unit (particularly the Minimum step size unit). Furthermore, it is required by RK45 to achieve, as expected, high numerical accuracy (or high smoothness of flow lines) through adaptive step sizing. Note this operation is performed (when NormalizeVector TRUE) right after vector interpolation such that the differing amount of contribution of each node (of a cell) to the resulting direction of the interpolated vector, due to the possibly significantly-differing velocity magnitude values at the nodes (which is the case with large cells), can be reflected as is. Also note that this flag needs to be turned to FALSE after vtkInitialValueProblemSolver:: ComputeNextStep() as subsequent operations, e.g., vorticity computation, may need non-normalized vectors.
|
virtual |
Set/Get the flag indicating vector post-normalization (following vector interpolation). Vector post-normalization is required to avoid the 'curve-overshooting' problem (caused by high velocity magnitude) that occurs when Cell-Length is used as the step size unit (particularly the Minimum step size unit). Furthermore, it is required by RK45 to achieve, as expected, high numerical accuracy (or high smoothness of flow lines) through adaptive step sizing. Note this operation is performed (when NormalizeVector TRUE) right after vector interpolation such that the differing amount of contribution of each node (of a cell) to the resulting direction of the interpolated vector, due to the possibly significantly-differing velocity magnitude values at the nodes (which is the case with large cells), can be reflected as is. Also note that this flag needs to be turned to FALSE after vtkInitialValueProblemSolver:: ComputeNextStep() as subsequent operations, e.g., vorticity computation, may need non-normalized vectors.
|
virtual |
If set to true, the first three point of the cell will be used to compute a normal to the cell, this normal will then be removed from the vorticity so the resulting vector in tangent to the cell.
|
virtual |
If set to true, the first three point of the cell will be used to compute a normal to the cell, this normal will then be removed from the vorticity so the resulting vector in tangent to the cell.
|
virtual |
If set to true, cell within tolerance factor will always be found, except for edges.
|
virtual |
If set to true, cell within tolerance factor will always be found, except for edges.
|
inlinevirtual |
Import parameters. Sub-classes can add more after chaining.
Reimplemented in vtkCellLocatorInterpolatedVelocityField.
Definition at line 169 of file vtkAbstractInterpolatedVelocityField.h.
|
pure virtual |
Evaluate the velocity field f at point (x, y, z).
Implements vtkFunctionSet.
Implemented in vtkCellLocatorInterpolatedVelocityField, vtkInterpolatedVelocityField, and vtkAMRInterpolatedVelocityField.
|
inline |
Set the last cell id to -1 to incur a global cell search for the next point.
Definition at line 179 of file vtkAbstractInterpolatedVelocityField.h.
Get the interpolation weights cached from last evaluation. Return 1 if the cached cell is valid and 0 otherwise.
Get the interpolation weights cached from last evaluation. Return 1 if the cached cell is valid and 0 otherwise.
|
protectedvirtual |
Set the name of a specific vector to be interpolated.
|
protectedvirtual |
Evaluate the velocity field f at point (x, y, z) in a specified dataset by invoking vtkDataSet::FindCell() to locate the next cell if the given point is outside the current cell. To address vtkPointSet, vtkPointLocator is involved via vtkPointSet::FindCell() in vtkInterpolatedVelocityField for cell location. In vtkCellLocatorInterpolatedVelocityField, this function is invoked just to handle vtkImageData and vtkRectilinearGrid that are not assigned with any vtkAbstractCellLocatot-type cell locator. If activated, returned vector will be tangential to the first three point of the cell
Reimplemented in vtkCellLocatorInterpolatedVelocityField, vtkInterpolatedVelocityField, and vtkAMRInterpolatedVelocityField.
|
protectedvirtual |
Check that all three pcoords are between 0 and 1 included.
|
protectedvirtual |
Try to find the cell closest to provided x point in provided dataset, By first testing inclusion in it's cached cell and neighbor Then testing globally Then , only if surfacic is activated finding the closest cell using FindPoint and comparing distance with tolerance
|
protected |
If all weights have been computed (parametric coords etc all valid), a scalar/vector can be quickly interpolated using the known weights and the cached generic cell. This function is primarily reserved for use by vtkTemporalInterpolatedVelocityField
|
protected |
If all weights have been computed (parametric coords etc all valid), a scalar/vector can be quickly interpolated using the known weights and the cached generic cell. This function is primarily reserved for use by vtkTemporalInterpolatedVelocityField
|
inlineprotected |
If all weights have been computed (parametric coords etc all valid), a scalar/vector can be quickly interpolated using the known weights and the cached generic cell. This function is primarily reserved for use by vtkTemporalInterpolatedVelocityField
Definition at line 248 of file vtkAbstractInterpolatedVelocityField.h.
|
friend |
Definition at line 240 of file vtkAbstractInterpolatedVelocityField.h.
|
staticprotected |
Definition at line 192 of file vtkAbstractInterpolatedVelocityField.h.
|
staticprotected |
Definition at line 193 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 195 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 196 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 197 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 198 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 199 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 200 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 201 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 202 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 203 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 204 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 205 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 206 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 207 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 208 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 209 of file vtkAbstractInterpolatedVelocityField.h.
|
protected |
Definition at line 210 of file vtkAbstractInterpolatedVelocityField.h.