VTK  9.2.6
vtkPLagrangianParticleTracker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPLagrangianParticleTracker.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
37 #ifndef vtkPLagrangianParticleTracker_h
38 #define vtkPLagrangianParticleTracker_h
39 
40 #include "vtkFiltersParallelFlowPathsModule.h" // For export macro
42 #include "vtkNew.h" // for ivars
43 
44 #include <map> // for std::map
45 
46 class ParticleFeedManager;
47 class ParticleIdManager;
48 class ParticleStreamManager;
49 class vtkMPIController;
52 
53 class VTKFILTERSPARALLELFLOWPATHS_EXPORT vtkPLagrangianParticleTracker
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61 protected:
64 
66 
67  void GenerateParticles(const vtkBoundingBox* bounds, vtkDataSet* seeds,
68  vtkDataArray* initialVelocities, vtkDataArray* initialIntegrationTimes, vtkPointData* seedData,
69  int nVar, std::queue<vtkLagrangianParticle*>& particles) override;
70 
85  void GetParticleFeed(std::queue<vtkLagrangianParticle*>& particleQueue) override;
87  std::queue<vtkLagrangianParticle*>& particleQueue, vtkPolyData* particlePathsOutput,
88  vtkPolyLine* particlePath, vtkDataObject* interactionOutput) override;
89 
93  void ReceiveParticles(std::queue<vtkLagrangianParticle*>& particleQueue);
94 
98  void ReceiveTransferredParticleIds();
99 
100  bool FinalizeOutputs(vtkPolyData* particlePathsOutput, vtkDataObject* interactionOutput) override;
101 
102  bool UpdateSurfaceCacheIfNeeded(vtkDataObject*& surfaces) override;
103 
108  vtkIdType GetNewParticleId() override;
109 
115  void DeleteParticle(vtkLagrangianParticle* particle) override;
116 
120  vtkGetMacro(ParticleCounter, vtkIdType);
121 
122  void SetController(vtkMPIController*);
123 
127  ParticleStreamManager* StreamManager;
128  ParticleIdManager* TransferredParticleIdManager;
129  ParticleFeedManager* FeedManager;
130 
131  std::mutex StreamManagerMutex;
133 
134  std::map<vtkIdType, vtkLagrangianParticle*> OutOfDomainParticleMap;
135 
136 private:
138  void operator=(const vtkPLagrangianParticleTracker&) = delete;
139 };
140 #endif
virtual void GetParticleFeed(std::queue< vtkLagrangianParticle * > &particleQueue)
represent and manipulate point attribute data
Definition: vtkPointData.h:41
static vtkLagrangianParticleTracker * New()
virtual bool FinalizeOutputs(vtkPolyData *particlePathsOutput, vtkDataObject *interactionOutput)
parallel Lagrangian particle tracker
Store vtkAlgorithm input/output information.
vtkNew< vtkMultiBlockDataSet > TmpSurfaceInputMB
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
vtkNew< vtkUnstructuredGrid > TmpSurfaceInput
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void DeleteParticle(vtkLagrangianParticle *particle)
This method is thread safe Call the ParticleAboutToBeDeleted model method and delete the particle...
dataset represents arbitrary combinations of all possible cell types
virtual int Integrate(vtkInitialValueProblemSolver *integrator, vtkLagrangianParticle *, std::queue< vtkLagrangianParticle * > &, vtkPolyData *particlePathsOutput, vtkPolyLine *particlePath, vtkDataObject *interactionOutput)
This method is thread safe.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Process communication using MPI.
Basis class for Lagrangian particles.
virtual bool UpdateSurfaceCacheIfNeeded(vtkDataObject *&surfaces)
virtual void GenerateParticles(const vtkBoundingBox *bounds, vtkDataSet *seeds, vtkDataArray *initialVelocities, vtkDataArray *initialIntegrationTimes, vtkPointData *seedData, int nVar, std::queue< vtkLagrangianParticle * > &particles)
Composite dataset that organizes datasets into blocks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
std::map< vtkIdType, vtkLagrangianParticle * > OutOfDomainParticleMap
virtual vtkIdType GetNewParticleId()
Get an unique id for a particle This method is thread safe.
general representation of visualization data
Definition: vtkDataObject.h:65
Filter to inject and track particles in a flow.
cell represents a set of 1D lines
Definition: vtkPolyLine.h:39
Fast, simple class for representing and operating on 3D bounds.
Integrate a set of ordinary differential equations (initial value problem) in time.