VTK  9.3.20240423
vtkPLagrangianParticleTracker.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
25#ifndef vtkPLagrangianParticleTracker_h
26#define vtkPLagrangianParticleTracker_h
27
28#include "vtkFiltersParallelFlowPathsModule.h" // For export macro
30#include "vtkNew.h" // for ivars
31
32#include <map> // for std::map
33
34VTK_ABI_NAMESPACE_BEGIN
35class ParticleFeedManager;
36class ParticleIdManager;
37class ParticleStreamManager;
41
42class VTKFILTERSPARALLELFLOWPATHS_EXPORT vtkPLagrangianParticleTracker
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
49
50protected:
53
55
56 void GenerateParticles(const vtkBoundingBox* bounds, vtkDataSet* seeds,
57 vtkDataArray* initialVelocities, vtkDataArray* initialIntegrationTimes, vtkPointData* seedData,
58 int nVar, std::queue<vtkLagrangianParticle*>& particles) override;
59
74 void GetParticleFeed(std::queue<vtkLagrangianParticle*>& particleQueue) override;
76 std::queue<vtkLagrangianParticle*>& particleQueue, vtkPolyData* particlePathsOutput,
77 vtkPolyLine* particlePath, vtkDataObject* interactionOutput) override;
78
82 void ReceiveParticles(std::queue<vtkLagrangianParticle*>& particleQueue);
83
88
89 bool FinalizeOutputs(vtkPolyData* particlePathsOutput, vtkDataObject* interactionOutput) override;
90
91 bool UpdateSurfaceCacheIfNeeded(vtkDataObject*& surfaces) override;
92
98
104 void DeleteParticle(vtkLagrangianParticle* particle) override;
105
109 vtkGetMacro(ParticleCounter, vtkIdType);
110
112
116 ParticleStreamManager* StreamManager;
118 ParticleFeedManager* FeedManager;
119
122
123 std::map<vtkIdType, vtkLagrangianParticle*> OutOfDomainParticleMap;
124
125private:
127 void operator=(const vtkPLagrangianParticleTracker&) = delete;
128};
129VTK_ABI_NAMESPACE_END
130#endif
Fast, simple class for representing and operating on 3D bounds.
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Integrate a set of ordinary differential equations (initial value problem) in time.
Filter to inject and track particles in a flow.
Basis class for Lagrangian particles.
Process communication using MPI.
Composite dataset that organizes datasets into blocks.
Allocate and hold a VTK object.
Definition vtkNew.h:160
parallel Lagrangian particle tracker
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkIdType GetNewParticleId() override
Get an unique id for a particle This method is thread safe.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GenerateParticles(const vtkBoundingBox *bounds, vtkDataSet *seeds, vtkDataArray *initialVelocities, vtkDataArray *initialIntegrationTimes, vtkPointData *seedData, int nVar, std::queue< vtkLagrangianParticle * > &particles) override
~vtkPLagrangianParticleTracker() override
void SetController(vtkMPIController *)
int Integrate(vtkInitialValueProblemSolver *integrator, vtkLagrangianParticle *, std::queue< vtkLagrangianParticle * > &particleQueue, vtkPolyData *particlePathsOutput, vtkPolyLine *particlePath, vtkDataObject *interactionOutput) override
This method is thread safe.
void ReceiveTransferredParticleIds()
Non threadsafe methods to receive transferred particle ids.
void DeleteParticle(vtkLagrangianParticle *particle) override
Delete a particle if not out of domain If out of domain, it will be stored and deleted later in case ...
void GetParticleFeed(std::queue< vtkLagrangianParticle * > &particleQueue) override
Flags description : Worker flag working : the worker has at least one particle in it's queue and is c...
static vtkPLagrangianParticleTracker * New()
vtkNew< vtkUnstructuredGrid > TmpSurfaceInput
bool UpdateSurfaceCacheIfNeeded(vtkDataObject *&surfaces) override
bool FinalizeOutputs(vtkPolyData *particlePathsOutput, vtkDataObject *interactionOutput) override
std::map< vtkIdType, vtkLagrangianParticle * > OutOfDomainParticleMap
void ReceiveParticles(std::queue< vtkLagrangianParticle * > &particleQueue)
Non threadsafe methods to receive particles.
vtkNew< vtkMultiBlockDataSet > TmpSurfaceInputMB
represent and manipulate point attribute data
concrete dataset represents vertices, lines, polygons, and triangle strips
cell represents a set of 1D lines
dataset represents arbitrary combinations of all possible cell types
int vtkIdType
Definition vtkType.h:315