VTK  9.4.20250130
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
76#ifndef vtkGhostCellsGenerator_h
77#define vtkGhostCellsGenerator_h
78
80
81#include "vtkFiltersParallelDIY2Module.h" // for export macros
82#include "vtkWeakPointer.h" // for vtkWeakPointer
83
84VTK_ABI_NAMESPACE_BEGIN
85class vtkDataObject;
88
89class VTKFILTERSPARALLELDIY2_EXPORT vtkGhostCellsGenerator : public vtkPassInputTypeAlgorithm
90{
91public:
94 void PrintSelf(ostream& os, vtkIndent indent) override;
95
97
104
106
110 virtual void Initialize();
111
113
119 vtkSetMacro(BuildIfRequired, bool);
120 vtkGetMacro(BuildIfRequired, bool);
121 vtkBooleanMacro(BuildIfRequired, bool);
123
125
132 vtkGetMacro(NumberOfGhostLayers, int);
133 vtkSetClampMacro(NumberOfGhostLayers, int, 0, VTK_INT_MAX);
135
137
141 vtkSetMacro(GenerateGlobalIds, bool);
142 vtkGetMacro(GenerateGlobalIds, bool);
143 vtkBooleanMacro(GenerateGlobalIds, bool);
145
147
151 vtkSetMacro(GenerateProcessIds, bool);
152 vtkGetMacro(GenerateProcessIds, bool);
153 vtkBooleanMacro(GenerateProcessIds, bool);
155
157
164 vtkSetMacro(SynchronizeOnly, bool);
165 vtkGetMacro(SynchronizeOnly, bool);
166 vtkBooleanMacro(SynchronizeOnly, bool);
168
170
177 vtkSetMacro(UseStaticMeshCache, bool);
178 vtkGetMacro(UseStaticMeshCache, bool);
179 vtkBooleanMacro(UseStaticMeshCache, bool);
181
182protected:
185
186 int FillInputPortInformation(int port, vtkInformation* info) override;
187
190
194 virtual int Execute(vtkDataObject* inputDO, vtkInformationVector* outputVector);
195
200
201 int NumberOfGhostLayers = 1;
202 bool BuildIfRequired = true;
203
204private:
206 void operator=(const vtkGhostCellsGenerator&) = delete;
207
214 bool CanSynchronize(vtkDataObject* input, bool& canSyncCell, bool& canSyncPoint);
215
216 int GenerateGhostCells(
217 vtkDataObject* input, vtkDataObject* output, int reqGhostLayers, bool syncOnly);
218
219 void UpdateCache(vtkDataObject* updatedOutput);
220 bool UseCacheIfPossible(vtkDataObject* input, vtkDataObject* output);
221
222 bool GenerateGlobalIds = false;
223 bool GenerateProcessIds = false;
224 bool SynchronizeOnly = false;
225
226 bool UseStaticMeshCache = true;
228};
229
230VTK_ABI_NAMESPACE_END
231#endif
vtkDataObjectMeshCache is a class to store and reuse the mesh of a vtkDataSet, while forwarding data ...
general representation of visualization data
Computes ghost cells on vtkCompositeDataSet inputs.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual int Execute(vtkDataObject *inputDO, vtkInformationVector *outputVector)
Runs the filter using custom inputs.
static vtkGhostCellsGenerator * New()
virtual void Initialize()
Resets parameter.
vtkWeakPointer< vtkMultiProcessController > Controller
Local controller.
~vtkGhostCellsGenerator() override
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiProcessController * GetController()
Get/Set the controller to use.
virtual void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
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.
Allocate and hold a VTK object.
Definition vtkNew.h:167
Superclass for algorithms that produce output of the same type as input.
a weak reference to a vtkObject.
#define VTK_INT_MAX
Definition vtkType.h:144