VTK
9.4.20250129
|
A helper class for interpolating between times during particle tracing. More...
#include <vtkTemporalInterpolatedVelocityField.h>
Public Types | |
enum | IDStates { INSIDE_ALL = 0 , OUTSIDE_ALL = 1 , OUTSIDE_T0 = 2 , OUTSIDE_T1 = 3 } |
States that define where the cell id are. More... | |
enum | MeshOverTimeTypes { DIFFERENT = 0 , STATIC = 1 , LINEAR_TRANSFORMATION = 2 , SAME_TOPOLOGY = 3 } |
Types of Variance of Mesh over time. More... | |
typedef vtkFunctionSet | Superclass |
Public Types inherited from vtkFunctionSet | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkTemporalInterpolatedVelocityField * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | Initialize (vtkCompositeDataSet *t0, vtkCompositeDataSet *t1) |
The Initialize() method is used to build and cache supporting structures (such as locators) which are used when operating on the interpolated velocity field. | |
virtual void | CopyParameters (vtkTemporalInterpolatedVelocityField *from) |
Copy essential parameters between instances of this class. | |
void | SelectVectors (const char *fieldName) |
If you want to work with an arbitrary vector array, then set its name here. | |
void | ClearCache () |
Set the last cell id to -1 so that the next search does not start from the previous cell. | |
bool | InterpolatePoint (vtkPointData *outPD1, vtkPointData *outPD2, vtkIdType outIndex) |
bool | InterpolatePoint (int T, vtkPointData *outPD1, vtkIdType outIndex) |
bool | GetVorticityData (int T, double pcoords[3], double *weights, vtkGenericCell *&cell, vtkDoubleArray *cellVectors) |
void | ShowCacheResults () |
void | AdvanceOneTimeStep () |
virtual int | FunctionValues (double *x, double *f) |
Evaluate functions at x_j. | |
virtual int | FunctionValues (double *x, double *f, void *vtkNotUsed(userData)) |
virtual void | SetMeshOverTime (int) |
void | SetMeshOverTimeToDifferent () |
void | SetMeshOverTimeToStatic () |
void | SetMeshOverTimeToLinearTransformation () |
void | SetMeshOverTimeToSameTopology () |
virtual int | GetMeshOverTime () |
int | FunctionValues (double *x, double *u) override |
Evaluate the velocity field, f, at (x, y, z, t). | |
int | FunctionValuesAtT (int T, double *x, double *u) |
Evaluate the velocity field, f, at (x, y, z, t). | |
void | AddDataSetAtTime (int N, double T, vtkDataSet *dataset) |
In order to use this class, two sets of data must be supplied, corresponding to times T1 and T2. | |
bool | GetCachedCellIds (vtkIdType id[2], int ds[2]) |
Between iterations of the Particle Tracer, Id's of the Cell are stored and then at the start of the next particle the Ids are set to 'pre-fill' the cache. | |
void | SetCachedCellIds (vtkIdType id[2], int ds[2]) |
Between iterations of the Particle Tracer, Id's of the Cell are stored and then at the start of the next particle the Ids are set to 'pre-fill' the cache. | |
int | TestPoint (double *x) |
A utility function which evaluates the point at T1, T2 to see if it is inside the data at both times or only one. | |
int | QuickTestPoint (double *x) |
A utility function which evaluates the point at T1, T2 to see if it is inside the data at both times or only one. | |
virtual double * | GetLastGoodVelocity () |
If an interpolation was successful, we can retrieve the last computed value from here. | |
virtual void | GetLastGoodVelocity (double &, double &, double &) |
If an interpolation was successful, we can retrieve the last computed value from here. | |
virtual void | GetLastGoodVelocity (double[3]) |
If an interpolation was successful, we can retrieve the last computed value from here. | |
virtual double | GetCurrentWeight () |
Get the most recent weight between 0->1 from T1->T2. | |
virtual void | SetFindCellStrategy (vtkFindCellStrategy *) |
Set / get the strategy used to perform the FindCell() operation. | |
virtual vtkFindCellStrategy * | GetFindCellStrategy () |
Set / get the strategy used to perform the FindCell() operation. | |
Public Member Functions inherited from vtkFunctionSet | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkFunctionSet * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
virtual int | FunctionValues (double *x, double *f) |
Evaluate functions at x_j. | |
virtual int | FunctionValues (double *x, double *f, void *vtkNotUsed(userData)) |
virtual int | GetNumberOfFunctions () |
Return the number of functions. | |
virtual int | GetNumberOfIndependentVariables () |
Return the number of independent variables. | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
vtkTypeBool | InvokeEvent (unsigned long event) |
vtkTypeBool | InvokeEvent (const char *event) |
std::string | GetObjectDescription () const override |
The object description printed in messages and PrintSelf output. | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. | |
vtkTypeBool | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
vtkTypeBool | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
virtual void | SetObjectName (const std::string &objectName) |
Set/get the name of this object for reporting purposes. | |
virtual std::string | GetObjectName () const |
Set/get the name of this object for reporting purposes. | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual std::string | GetObjectDescription () const |
The object description printed in messages and PrintSelf output. | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual bool | UsesGarbageCollector () const |
Indicate whether the class uses vtkGarbageCollector or not. | |
Static Public Member Functions | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkTemporalInterpolatedVelocityField * | SafeDownCast (vtkObjectBase *o) |
static vtkTemporalInterpolatedVelocityField * | New () |
Construct a vtkTemporalInterpolatedVelocityField with no initial data set. | |
Static Public Member Functions inherited from vtkFunctionSet | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkFunctionSet * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (vtkTypeBool val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static vtkTypeBool | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkTemporalInterpolatedVelocityField () | |
~vtkTemporalInterpolatedVelocityField () override | |
virtual void | SetVectorsSelection (const char *v) |
void | InitializeWithLocators (vtkCompositeInterpolatedVelocityField *ivf, const std::vector< vtkDataSet * > &datasets, vtkFindCellStrategy *strategy, const std::vector< vtkSmartPointer< vtkLocator > > &locators, const std::vector< vtkSmartPointer< vtkAbstractCellLinks > > &links) |
void | CreateLocators (const std::vector< vtkDataSet * > &datasets, vtkFindCellStrategy *strategy, std::vector< vtkSmartPointer< vtkLocator > > &locators) |
void | CreateLinks (const std::vector< vtkDataSet * > &datasets, std::vector< vtkSmartPointer< vtkAbstractCellLinks > > &links) |
void | CreateLinearTransformCellLocators (const std::vector< vtkSmartPointer< vtkLocator > > &locators, std::vector< vtkSmartPointer< vtkLocator > > &linearCellLocators) |
Protected Member Functions inherited from vtkFunctionSet | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkFunctionSet () | |
~vtkFunctionSet () override=default | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
virtual void | ObjectFinalize () |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
int | MeshOverTime = MeshOverTimeTypes::DIFFERENT |
double | Vals1 [3] |
double | Vals2 [3] |
double | Times [2] |
double | LastGoodVelocity [3] |
double | CurrentWeight |
double | OneMinusWeight |
double | ScaleCoeff |
vtkSmartPointer< vtkCompositeInterpolatedVelocityField > | IVF [2] |
std::vector< vtkSmartPointer< vtkLocator > > | Locators [2] |
std::vector< vtkSmartPointer< vtkLocator > > | InitialCellLocators |
std::vector< vtkSmartPointer< vtkAbstractCellLinks > > | Links [2] |
std::vector< size_t > | MaxCellSizes [2] |
vtkFindCellStrategy * | FindCellStrategy |
Protected Attributes inherited from vtkFunctionSet | |
int | NumFuncs |
int | NumIndepVars |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
std::string | ObjectName |
Protected Attributes inherited from vtkObjectBase | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Static Protected Attributes | |
static const double | WEIGHT_TO_TOLERANCE |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
A helper class for interpolating between times during particle tracing.
vtkTemporalInterpolatedVelocityField is a general purpose helper for the temporal particle tracing code (vtkParticleTracerBase)
It maintains two copies of vtkCompositeInterpolatedVelocityField internally and uses them to obtain velocity values at time T0 and T1.
In fact the class does quite a bit more than this because when the geometry of the datasets is the same at T0 and T1, we can re-use cached cell Ids and weights used in the cell interpolation routines. Additionally, the same weights can be used when interpolating (point) scalar values and computing vorticity etc.
Definition at line 56 of file vtkTemporalInterpolatedVelocityField.h.
Definition at line 59 of file vtkTemporalInterpolatedVelocityField.h.
States that define where the cell id are.
Enumerator | |
---|---|
INSIDE_ALL | |
OUTSIDE_ALL | |
OUTSIDE_T0 | |
OUTSIDE_T1 |
Definition at line 71 of file vtkTemporalInterpolatedVelocityField.h.
Types of Variance of Mesh over time.
Enumerator | |
---|---|
DIFFERENT | |
STATIC | |
LINEAR_TRANSFORMATION | |
SAME_TOPOLOGY |
Definition at line 82 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
|
overrideprotected |
|
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.
|
static |
|
protectedvirtual |
Reimplemented from vtkFunctionSet.
vtkTemporalInterpolatedVelocityField * vtkTemporalInterpolatedVelocityField::NewInstance | ( | ) | const |
|
overridevirtual |
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.
|
static |
Construct a vtkTemporalInterpolatedVelocityField with no initial data set.
Caching is on. LastCellId is set to -1.
|
virtual |
|
inline |
Definition at line 100 of file vtkTemporalInterpolatedVelocityField.h.
|
inline |
Definition at line 101 of file vtkTemporalInterpolatedVelocityField.h.
|
inline |
Definition at line 102 of file vtkTemporalInterpolatedVelocityField.h.
|
inline |
Definition at line 103 of file vtkTemporalInterpolatedVelocityField.h.
|
virtual |
void vtkTemporalInterpolatedVelocityField::Initialize | ( | vtkCompositeDataSet * | t0, |
vtkCompositeDataSet * | t1 | ||
) |
The Initialize() method is used to build and cache supporting structures (such as locators) which are used when operating on the interpolated velocity field.
This method is needed mainly to deal with thread safety issues; i.e., these supporting structures must be built at the right time to avoid race conditions.
|
virtual |
Copy essential parameters between instances of this class.
This generally is used to copy from instance prototype to another, or to copy interpolators between thread instances. Sub-classes can contribute to the parameter copying process via chaining.
|
overridevirtual |
Evaluate the velocity field, f, at (x, y, z, t).
For now, t is ignored.
Reimplemented from vtkFunctionSet.
int vtkTemporalInterpolatedVelocityField::FunctionValuesAtT | ( | int | T, |
double * | x, | ||
double * | u | ||
) |
Evaluate the velocity field, f, at (x, y, z, t).
For now, t is ignored.
|
inline |
If you want to work with an arbitrary vector array, then set its name here.
By default this is nullptr and the filter will use the active vector array.
Definition at line 139 of file vtkTemporalInterpolatedVelocityField.h.
void vtkTemporalInterpolatedVelocityField::AddDataSetAtTime | ( | int | N, |
double | T, | ||
vtkDataSet * | dataset | ||
) |
In order to use this class, two sets of data must be supplied, corresponding to times T1 and T2.
Data is added via this function.
bool vtkTemporalInterpolatedVelocityField::GetCachedCellIds | ( | vtkIdType | id[2], |
int | ds[2] | ||
) |
Between iterations of the Particle Tracer, Id's of the Cell are stored and then at the start of the next particle the Ids are set to 'pre-fill' the cache.
void vtkTemporalInterpolatedVelocityField::SetCachedCellIds | ( | vtkIdType | id[2], |
int | ds[2] | ||
) |
Between iterations of the Particle Tracer, Id's of the Cell are stored and then at the start of the next particle the Ids are set to 'pre-fill' the cache.
void vtkTemporalInterpolatedVelocityField::ClearCache | ( | ) |
Set the last cell id to -1 so that the next search does not start from the previous cell.
int vtkTemporalInterpolatedVelocityField::TestPoint | ( | double * | x | ) |
A utility function which evaluates the point at T1, T2 to see if it is inside the data at both times or only one.
int vtkTemporalInterpolatedVelocityField::QuickTestPoint | ( | double * | x | ) |
A utility function which evaluates the point at T1, T2 to see if it is inside the data at both times or only one.
|
virtual |
If an interpolation was successful, we can retrieve the last computed value from here.
Initial value is (0.0,0.0,0.0)
|
virtual |
If an interpolation was successful, we can retrieve the last computed value from here.
Initial value is (0.0,0.0,0.0)
|
virtual |
If an interpolation was successful, we can retrieve the last computed value from here.
Initial value is (0.0,0.0,0.0)
|
virtual |
Get the most recent weight between 0->1 from T1->T2.
Initial value is 0.
bool vtkTemporalInterpolatedVelocityField::InterpolatePoint | ( | vtkPointData * | outPD1, |
vtkPointData * | outPD2, | ||
vtkIdType | outIndex | ||
) |
bool vtkTemporalInterpolatedVelocityField::InterpolatePoint | ( | int | T, |
vtkPointData * | outPD1, | ||
vtkIdType | outIndex | ||
) |
bool vtkTemporalInterpolatedVelocityField::GetVorticityData | ( | int | T, |
double | pcoords[3], | ||
double * | weights, | ||
vtkGenericCell *& | cell, | ||
vtkDoubleArray * | cellVectors | ||
) |
void vtkTemporalInterpolatedVelocityField::ShowCacheResults | ( | ) |
void vtkTemporalInterpolatedVelocityField::AdvanceOneTimeStep | ( | ) |
|
virtual |
Set / get the strategy used to perform the FindCell() operation.
This strategy is used when operating on vtkPointSet subclasses. Note if the input is a composite dataset then the strategy will be used to clone one strategy per leaf dataset.
|
virtual |
Set / get the strategy used to perform the FindCell() operation.
This strategy is used when operating on vtkPointSet subclasses. Note if the input is a composite dataset then the strategy will be used to clone one strategy per leaf dataset.
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlinevirtual |
Evaluate functions at x_j.
x and f have to point to valid double arrays of appropriate sizes obtained with GetNumberOfFunctions() and GetNumberOfIndependentVariables. If you inherit this class, make sure to reimplement at least one of the two FunctionValues signatures.
Reimplemented from vtkFunctionSet.
Definition at line 38 of file vtkFunctionSet.h.
|
inlinevirtual |
Reimplemented from vtkFunctionSet.
Definition at line 39 of file vtkFunctionSet.h.
|
protected |
Definition at line 218 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 232 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 233 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 234 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 235 of file vtkTemporalInterpolatedVelocityField.h.
|
staticprotected |
Definition at line 237 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 241 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 243 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 245 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 247 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 248 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 249 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 250 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 251 of file vtkTemporalInterpolatedVelocityField.h.
|
protected |
Definition at line 253 of file vtkTemporalInterpolatedVelocityField.h.