VTK: Filters/ParallelFlowPaths/vtkPParticleTracerBase.h Source File

| VTK 9.3.1

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:
29 vtkTypeMacro(vtkPParticleTracerBase, vtkParticleTracerBase);
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
33
37 virtual void SetController(vtkMultiProcessController* controller);
38 vtkGetObjectMacro(Controller, vtkMultiProcessController);
40
41 protected:
42 struct RemoteParticleInfo
43 {
44 vtkParticleTracerBaseNamespace::ParticleInformation Current;
45 vtkParticleTracerBaseNamespace::ParticleInformation Previous;
46 vtkSmartPointer<vtkPointData> PreviousPD;
47 };
48
49 typedef std::vector<RemoteParticleInfo> RemoteParticleVector;
50
51 vtkPParticleTracerBase();
52 ~vtkPParticleTracerBase() override;
53
54 int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
55 vtkInformationVector* outputVector) override;
56
57 //
58
59 vtkPolyData* Execute(vtkInformationVector** inputVector) override;
60 bool SendParticleToAnotherProcess(vtkParticleTracerBaseNamespace::ParticleInformation& info,
61 vtkParticleTracerBaseNamespace::ParticleInformation& previous, vtkPointData*) override;
62
70 void AssignSeedsToProcessors(double time, vtkDataSet* source, int sourceID, int ptId,
71 vtkParticleTracerBaseNamespace::ParticleVector& localSeedPoints,
72 int& localAssignedCount) override;
73
78 void AssignUniqueIds(vtkParticleTracerBaseNamespace::ParticleVector& localSeedPoints) override;
79
85 bool SendReceiveParticles(RemoteParticleVector& outofdomain, RemoteParticleVector& received);
86
87 bool UpdateParticleListFromOtherProcesses() override;
88
94 bool IsPointDataValid(vtkDataObject* input) override;
95
96 //
97
98 //
99
100 // MPI controller needed when running in parallel
101 vtkMultiProcessController* Controller;
102
103 // List used for transmitting between processors during parallel operation
104 RemoteParticleVector MPISendList;
105
106 RemoteParticleVector Tail; // this is to receive the "tails" of traces from other processes
107 private:
108 vtkPParticleTracerBase(const vtkPParticleTracerBase&) = delete;
109 void operator=(const vtkPParticleTracerBase&) = delete;
110 };
111 VTK_ABI_NAMESPACE_END
112 #endif
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:72
vtkPParticleTracerBase
Definition: vtkPParticleTracerBase.h:27
vtkPParticleTracerBase::RemoteParticleVector
std::vector< RemoteParticleInfo > RemoteParticleVector
Definition: vtkPParticleTracerBase.h:49
vtkPParticleTracerBase::MPISendList
RemoteParticleVector MPISendList
Definition: vtkPParticleTracerBase.h:104
vtkPParticleTracerBase::SendReceiveParticles
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::~vtkPParticleTracerBase
~vtkPParticleTracerBase() override
vtkPParticleTracerBase::SendParticleToAnotherProcess
bool SendParticleToAnotherProcess(vtkParticleTracerBaseNamespace::ParticleInformation &info, vtkParticleTracerBaseNamespace::ParticleInformation &previous, vtkPointData *) override
vtkPParticleTracerBase::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkPParticleTracerBase::Controller
vtkMultiProcessController * Controller
Definition: vtkPParticleTracerBase.h:101
vtkPParticleTracerBase::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPParticleTracerBase::UpdateParticleListFromOtherProcesses
bool UpdateParticleListFromOtherProcesses() override
this is used during classification of seed points and also between iterations of the main loop as par...
vtkPParticleTracerBase::Tail
RemoteParticleVector Tail
Definition: vtkPParticleTracerBase.h:106
vtkPParticleTracerBase::AssignUniqueIds
void AssignUniqueIds(vtkParticleTracerBaseNamespace::ParticleVector &localSeedPoints) override
give each one a unique ID.
vtkPParticleTracerBase::Execute
vtkPolyData * Execute(vtkInformationVector **inputVector) override
vtkPParticleTracerBase::vtkPParticleTracerBase
vtkPParticleTracerBase()
vtkPParticleTracerBase::SetController
virtual void SetController(vtkMultiProcessController *controller)
Set/Get the controller used when sending particles between processes The controller must be an instan...
vtkPParticleTracerBase::IsPointDataValid
bool IsPointDataValid(vtkDataObject *input) override
Method that checks that the input arrays are ordered the same on all data sets.
vtkPParticleTracerBase::AssignSeedsToProcessors
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...
vtkParticleTracerBase
A particle tracer for vector fields.
Definition: vtkParticleTracerBase.h:98
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:39
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkSmartPointer< vtkPointData >
vtkParticleTracerBaseNamespace::ParticleVector
std::vector< ParticleInformation > ParticleVector
Definition: vtkParticleTracerBase.h:88
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::previous
@ previous
Definition: vtkX3D.h:449
vtkX3D::time
@ time
Definition: vtkX3D.h:497
vtkPParticleTracerBase::RemoteParticleInfo
Definition: vtkPParticleTracerBase.h:43
vtkPParticleTracerBase::RemoteParticleInfo::Current
vtkParticleTracerBaseNamespace::ParticleInformation Current
Definition: vtkPParticleTracerBase.h:44
vtkPParticleTracerBase::RemoteParticleInfo::Previous
vtkParticleTracerBaseNamespace::ParticleInformation Previous
Definition: vtkPParticleTracerBase.h:45
vtkPParticleTracerBase::RemoteParticleInfo::PreviousPD
vtkSmartPointer< vtkPointData > PreviousPD
Definition: vtkPParticleTracerBase.h:46
vtkParticleTracerBaseNamespace::ParticleInformation_t
Definition: vtkParticleTracerBase.h:58
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:964
vtkParticleTracerBase.h
vtkSmartPointer.h