VTK  9.3.20240419
vtkPParticleTracerBase.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
15 #ifndef vtkPParticleTracerBase_h
16 #define vtkPParticleTracerBase_h
17 
18 #include "vtkParticleTracerBase.h"
19 #include "vtkSmartPointer.h" // For protected ivars.
20 
21 #include <vector> // STL Header
22 
23 #include "vtkFiltersParallelFlowPathsModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKFILTERSPARALLELFLOWPATHS_EXPORT vtkPParticleTracerBase : public vtkParticleTracerBase
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
37  virtual void SetController(vtkMultiProcessController* controller);
38  vtkGetObjectMacro(Controller, vtkMultiProcessController);
40 
41 protected:
43  {
47  };
48 
49  typedef std::vector<RemoteParticleInfo> RemoteParticleVector;
50 
53 
55  vtkInformationVector* outputVector) override;
56 
57  //
58 
59  vtkPolyData* Execute(vtkInformationVector** inputVector) override;
62 
70  void AssignSeedsToProcessors(double time, vtkDataSet* source, int sourceID, int ptId,
72  int& localAssignedCount) override;
73 
79 
86 
88 
94  bool IsPointDataValid(vtkDataObject* input) override;
95 
96  //
97 
98  //
99 
100  // MPI controller needed when running in parallel
102 
103  // List used for transmitting between processors during parallel operation
105 
106  RemoteParticleVector Tail; // this is to receive the "tails" of traces from other processes
107 private:
109  void operator=(const vtkPParticleTracerBase&) = delete;
110 };
111 VTK_ABI_NAMESPACE_END
112 #endif
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.
Multiprocessing communication superclass.
std::vector< RemoteParticleInfo > RemoteParticleVector
RemoteParticleVector MPISendList
bool SendReceiveParticles(RemoteParticleVector &outofdomain, RemoteParticleVector &received)
this is used during classification of seed points and also between iterations of the main loop as par...
~vtkPParticleTracerBase() override
bool SendParticleToAnotherProcess(vtkParticleTracerBaseNamespace::ParticleInformation &info, vtkParticleTracerBaseNamespace::ParticleInformation &previous, vtkPointData *) override
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkMultiProcessController * Controller
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool UpdateParticleListFromOtherProcesses() override
this is used during classification of seed points and also between iterations of the main loop as par...
void AssignUniqueIds(vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints) override
give each one a unique ID.
vtkPolyData * Execute(vtkInformationVector **inputVector) override
virtual void SetController(vtkMultiProcessController *controller)
Set/Get the controller used when sending particles between processes The controller must be an instan...
bool IsPointDataValid(vtkDataObject *input) override
Method that checks that the input arrays are ordered the same on all data sets.
void AssignSeedsToProcessors(double time, vtkDataSet *source, int sourceID, int ptId, vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints, int &localAssignedCount) override
Before starting the particle trace, classify all the injection/seed points according to which process...
A particle tracer for vector fields.
represent and manipulate point attribute data
Definition: vtkPointData.h:140
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:181
std::vector< ParticleInformation > ParticleVector
@ info
Definition: vtkX3D.h:376
@ previous
Definition: vtkX3D.h:449
@ time
Definition: vtkX3D.h:497
vtkParticleTracerBaseNamespace::ParticleInformation Current
vtkParticleTracerBaseNamespace::ParticleInformation Previous
vtkSmartPointer< vtkPointData > PreviousPD
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)