28#ifndef vtkParticleTracerBase_h
29#define vtkParticleTracerBase_h
32#include "vtkFiltersFlowPathsModule.h"
101struct ParticleTracerFunctor;
107 friend struct vtkParticleTracerBaseNamespace::ParticleTracerFunctor;
127 vtkGetMacro(ComputeVorticity,
bool);
135 vtkGetMacro(TerminalSpeed,
double);
144 vtkGetMacro(RotationScale,
double);
180 vtkGetMacro(TerminationTime,
double);
194 vtkGetMacro(StartTime,
double);
239 vtkGetMacro(MeshOverTime,
int);
481 std::atomic<vtkIdType>& particleCount, std::mutex& eraseMutex,
bool sequential);
498 double pos[4],
double p2[4],
double intersection[4],
vtkGenericCell* cell);
542 vtkGetMacro(ReinjectionCounter,
int);
543 vtkGetMacro(CurrentTimeValue,
double);
579 bool SetTerminationTimeNoModify(
double t);
583 double IntegrationStep;
585 bool ComputeVorticity;
586 double RotationScale;
587 double TerminalSpeed;
590 int ReinjectionCounter;
597 std::vector<double> InputTimeValues;
599 double TerminationTime;
600 double CurrentTimeValue;
605 int TerminationTimeStep;
615 char* ParticleFileName;
632 using bounds =
struct bounds_t;
633 std::vector<bounds> CachedBounds[2];
637 vtkSmartPointer<vtkDataSet> DataReferenceT[2];
639 vtkSmartPointer<vtkPoints> OutputCoordinates;
640 vtkSmartPointer<vtkIdTypeArray> ParticleCellsConnectivity;
641 vtkSmartPointer<vtkIdTypeArray> ParticleCellsOffsets;
642 vtkSmartPointer<vtkCellArray> ParticleCells;
644 vtkSmartPointer<vtkFloatArray> ParticleAge;
645 vtkSmartPointer<vtkIntArray> ParticleIds;
646 vtkSmartPointer<vtkSignedCharArray> ParticleSourceIds;
647 vtkSmartPointer<vtkIntArray> InjectedPointIds;
648 vtkSmartPointer<vtkIntArray> InjectedStepIds;
649 vtkSmartPointer<vtkIntArray> ErrorCodeArray;
650 vtkSmartPointer<vtkFloatArray> ParticleVorticity;
651 vtkSmartPointer<vtkFloatArray> ParticleRotation;
652 vtkSmartPointer<vtkFloatArray> ParticleAngularVel;
653 vtkSmartPointer<vtkPointData> OutputPointData;
656 vtkSmartPointer<vtkDoubleArray> CellVectors;
658 vtkParticleTracerBase(
const vtkParticleTracerBase&) =
delete;
659 void operator=(
const vtkParticleTracerBase&) =
delete;
660 vtkTimeStamp ExecuteTime;
662 unsigned int NumberOfParticles();
667 static const double Epsilon;
abstract class to write particle data to file
Proxy object to connect input/output ports.
object to represent cell connectivity
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
abstract class to specify dataset behavior
dynamic, self-adjusting array of double
dynamic, self-adjusting array of float
provides thread-safe access to cells
a simple class to control print indentation
Integrate a set of ordinary differential equations (initial value problem) in time.
dynamic, self-adjusting array of int
Composite dataset that organizes datasets into blocks.
Multiprocessing communication superclass.
vtkTypeBool DisableResetCache
ProtoPD is used just to keep track of the input array names and number of components for copy allocat...
vtkFloatArray * GetParticleVorticity(vtkPointData *)
vtkSmartPointer< vtkPointData > ProtoPD
ProtoPD is used just to keep track of the input array names and number of components for copy allocat...
double GetCacheDataTime()
void SetComputeVorticity(bool)
Turn on/off vorticity computation at streamline points (necessary for generating proper stream-ribbon...
vtkSmartPointer< vtkPointData > ParticlePointData
ProtoPD is used just to keep track of the input array names and number of components for copy allocat...
vtkIntArray * GetInjectedPointIds(vtkPointData *)
vtkFloatArray * GetParticleAge(vtkPointData *)
void TestParticles(vtkParticleTracerBaseNamespace::ParticleVector &candidates, std::vector< int > &passed)
virtual void AddRestartSeeds(vtkInformationVector **)
For restarts of particle paths, we add in the ability to add in particles from a previous computation...
virtual int GetMeshOverTimeMinValue()
bool IsPointDataValid(vtkCompositeDataSet *input, std::vector< std::string > &arrayNames)
Methods that check that the input arrays are ordered the same on all data sets.
void SetInterpolatorTypeToCellLocator()
Set the velocity field interpolator type to one that uses a cell locator to perform spatial searching...
void SetTerminationTime(double t)
Setting TerminationTime to a positive value will cause particles to terminate when the time is reache...
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkIntArray * GetInjectedStepIds(vtkPointData *)
virtual bool UpdateParticleListFromOtherProcesses()
this is used during classification of seed points and also between iterations of the main loop as par...
virtual std::vector< vtkDataSet * > GetSeedSources(vtkInformationVector *inputVector, int timeStep)
Method to get the data set seed sources.
vtkIntArray * GetErrorCodeArr(vtkPointData *)
void SetParticle(vtkParticleTracerBaseNamespace::ParticleInformation &info, double *velocity, vtkTemporalInterpolatedVelocityField *interpolator, vtkIdType particleId, vtkDoubleArray *cellVectors)
void UpdateParticleList(vtkParticleTracerBaseNamespace::ParticleVector &candidates)
and sending between processors, into a list, which is used as the master list on this processor
vtkGetFilePathMacro(ParticleFileName)
Set/Get the filename to be used with the particle writer when dumping particles to disk.
virtual void SetToExtraPointDataArrays(vtkIdType, vtkParticleTracerBaseNamespace::ParticleInformation &)
vtkFloatArray * GetParticleAngularVel(vtkPointData *)
double GetCacheDataTime(int i)
void TestParticles(vtkParticleTracerBaseNamespace::ParticleVector &candidates, vtkParticleTracerBaseNamespace::ParticleVector &passed, int &count)
inside our data.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
void AddSourceConnection(vtkAlgorithmOutput *input)
Provide support for multiple seed sources.
void SetForceReinjectionEveryNSteps(vtkTypeBool)
When animating particles, it is nice to inject new ones every Nth step to produce a continuous flow.
virtual vtkPolyData * Execute(vtkInformationVector **inputVector)
void RemoveAllSources()
Provide support for multiple seed sources.
void CalculateVorticity(vtkGenericCell *cell, double pcoords[3], vtkDoubleArray *cellVectors, double vorticity[3])
void CreateProtoPD(vtkDataObject *input)
virtual vtkTypeBool GetStaticMesh()
if StaticMesh is set, many optimizations for cell caching can be assumed.
virtual int ProcessInput(vtkInformationVector **inputVector)
virtual bool SendParticleToAnotherProcess(vtkParticleTracerBaseNamespace::ParticleInformation &, vtkParticleTracerBaseNamespace::ParticleInformation &, vtkPointData *)
virtual void SetStaticMesh(vtkTypeBool staticMesh)
if StaticMesh is set, many optimizations for cell caching can be assumed.
vtkIntArray * GetParticleIds(vtkPointData *)
MeshOverTimeTypes
Types of Variance of Mesh over time.
void SetMeshOverTimeToDifferent()
int UpdateDataCache(vtkDataObject *td)
void SetTerminalSpeed(double)
Specify the terminal speed value, below which integration is terminated.
virtual void SetParticleWriter(vtkAbstractParticleWriter *pw)
Set/Get the Writer associated with this Particle Tracer Ideally a parallel IO capable vtkH5PartWriter...
virtual int GetMeshOverTimeMaxValue()
void SetRotationScale(double)
This can be used to scale the rate with which the streamribbons twist.
vtkParticleTracerBaseNamespace::ParticleDataList ParticleHistories
ProtoPD is used just to keep track of the input array names and number of components for copy allocat...
vtkFloatArray * GetParticleRotation(vtkPointData *)
void IntegrateParticle(vtkParticleTracerBaseNamespace::ParticleListIterator &it, double currentTime, double targetTime, vtkInitialValueProblemSolver *integrator, vtkTemporalInterpolatedVelocityField *interpolator, vtkDoubleArray *cellVectors, std::atomic< vtkIdType > &particleCount, std::mutex &eraseMutex, bool sequential)
particle between the two times supplied.
void GetPointDataArrayNames(vtkDataSet *input, std::vector< std::string > &names)
Methods that check that the input arrays are ordered the same on all data sets.
virtual void Initialize()
void SetInterpolatorType(int interpolatorType)
Set the type of the velocity field interpolator to determine whether INTERPOLATOR_WITH_DATASET_POINT_...
virtual void SetMeshOverTime(int meshOverTime)
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void SetStartTime(double t)
Set the time value for particle tracing to begin.
virtual void AssignSeedsToProcessors(double time, vtkDataSet *source, int sourceID, int ptId, vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints, int &localAssignedCount)
all the injection/seed points according to which processor they belong to.
bool ForceSerialExecution
vtkTypeBool IgnorePipelineTime
ProtoPD is used just to keep track of the input array names and number of components for copy allocat...
bool InsideBounds(double point[])
virtual bool IsPointDataValid(vtkDataObject *input)
Methods that check that the input arrays are ordered the same on all data sets.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
friend class ParticlePathFilterInternal
vtkTemporalInterpolatedVelocityField * GetInterpolator()
void SetMeshOverTimeToLinearTransformation()
void SetIntegratorType(int type)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
@ INTERPOLATOR_WITH_CELL_LOCATOR
@ INTERPOLATOR_WITH_DATASET_POINT_LOCATOR
void PrintParticleHistories()
void SetMeshOverTimeToStatic()
vtkIdType UniqueIdCounter
ProtoPD is used just to keep track of the input array names and number of components for copy allocat...
virtual void InitializeExtraPointDataArrays(vtkPointData *vtkNotUsed(outputPD))
Methods to append values to existing point data arrays that may only be desired on specific concrete ...
friend class StreaklineFilterInternal
~vtkParticleTracerBase() override
void SetIntegrator(vtkInitialValueProblemSolver *)
bool ComputeDomainExitLocation(double pos[4], double p2[4], double intersection[4], vtkGenericCell *cell)
This is an old routine kept for possible future use.
virtual void ResetCache()
void ResizeArrays(vtkIdType numTuples)
void SetInterpolatorTypeToDataSetPointLocator()
Set the velocity field interpolator type to one that uses a point locator to perform local spatial se...
vtkSignedCharArray * GetParticleSourceIds(vtkPointData *)
virtual void AssignUniqueIds(vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints)
give each one a unique ID.
void SetMeshOverTimeToSameTopology()
vtkSetFilePathMacro(ParticleFileName)
Set/Get the filename to be used with the particle writer when dumping particles to disk.
virtual int OutputParticles(vtkPolyData *poly)=0
int InitializeInterpolator()
vtkSmartPointer< vtkPolyData > Output
represent and manipulate point attribute data
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips
dynamic, self-adjusting array of signed char
Hold a reference to a vtkObjectBase instance.
A helper class for interpolating between times during particle tracing.
record modification and/or execution time
struct ParticleInformation_t ParticleInformation
ParticleVector::iterator ParticleIterator
struct Position_t Position
std::list< ParticleInformation > ParticleDataList
ParticleDataList::iterator ParticleListIterator
std::vector< ParticleInformation > ParticleVector
vtkIdType CachedCellId[2]
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_DEPRECATED_IN_9_2_0(reason)