VTK  9.7.1
vtkGhostCellsGenerator.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
85 #ifndef vtkGhostCellsGenerator_h
86 #define vtkGhostCellsGenerator_h
87 
89 
90 #include "vtkFiltersParallelDIY2Module.h" // for export macros
91 #include "vtkWeakPointer.h" // for vtkWeakPointer
92 
93 VTK_ABI_NAMESPACE_BEGIN
94 class vtkDataObject;
97 
98 class VTKFILTERSPARALLELDIY2_EXPORT vtkGhostCellsGenerator : public vtkPassInputTypeAlgorithm
99 {
100 public:
101  static vtkGhostCellsGenerator* New();
103  void PrintSelf(ostream& os, vtkIndent indent) override;
104 
106 
110  virtual void SetController(vtkMultiProcessController*);
111  vtkMultiProcessController* GetController();
113 
115 
118  virtual void Initialize();
120 
122 
128  vtkSetMacro(BuildIfRequired, bool);
129  vtkGetMacro(BuildIfRequired, bool);
130  vtkBooleanMacro(BuildIfRequired, bool);
132 
134 
141  vtkGetMacro(NumberOfGhostLayers, int);
142  vtkSetClampMacro(NumberOfGhostLayers, int, 0, VTK_INT_MAX);
144 
146 
150  vtkSetMacro(GenerateGlobalIds, bool);
151  vtkGetMacro(GenerateGlobalIds, bool);
152  vtkBooleanMacro(GenerateGlobalIds, bool);
154 
156 
160  vtkSetMacro(GenerateProcessIds, bool);
161  vtkGetMacro(GenerateProcessIds, bool);
162  vtkBooleanMacro(GenerateProcessIds, bool);
164 
166 
173  vtkSetMacro(SynchronizeOnly, bool);
174  vtkGetMacro(SynchronizeOnly, bool);
175  vtkBooleanMacro(SynchronizeOnly, bool);
177 
179 
186  vtkSetMacro(UseStaticMeshCache, bool);
187  vtkGetMacro(UseStaticMeshCache, bool);
188  vtkBooleanMacro(UseStaticMeshCache, bool);
190 
192 
198  vtkSetMacro(UseImplicitArrays, bool);
199  vtkGetMacro(UseImplicitArrays, bool);
200  vtkBooleanMacro(UseImplicitArrays, bool);
202 
203 protected:
205  ~vtkGhostCellsGenerator() override;
206 
207  int FillInputPortInformation(int port, vtkInformation* info) override;
208 
211 
215  virtual int Execute(vtkDataObject* inputDO, vtkInformationVector* outputVector);
216 
221 
222  int NumberOfGhostLayers = 1;
223  bool BuildIfRequired = true;
224 
225 private:
227  void operator=(const vtkGhostCellsGenerator&) = delete;
228 
235  bool CanSynchronize(vtkDataObject* input, bool& canSyncCell, bool& canSyncPoint);
236 
237  int GenerateGhostCells(
238  vtkDataObject* input, vtkDataObject* output, int reqGhostLayers, bool syncOnly);
239 
240  void UpdateCache(vtkDataObject* updatedOutput);
241  bool UseCacheIfPossible(vtkDataObject* input, vtkDataObject* output);
242 
243  bool GenerateGlobalIds = false;
244  bool GenerateProcessIds = false;
245  bool SynchronizeOnly = false;
246 
247  bool UseStaticMeshCache = true;
249 
250  bool UseImplicitArrays = false;
251 };
252 
253 VTK_ABI_NAMESPACE_END
254 #endif
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:192
vtkWeakPointer< vtkMultiProcessController > Controller
Local controller.
Computes ghost cells on vtkCompositeDataSet inputs.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
a simple class to control print indentation
Definition: vtkIndent.h:28
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
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.
vtkDataObjectMeshCache is a class to store and reuse the mesh of a vtkDataSet, while forwarding data ...
general representation of visualization data
Definition: vtkDataObject.h:55
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()
Multiprocessing communication superclass.