VTK  9.3.20240425
vtkStructuredImplicitConnectivity.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
30#ifndef vtkStructuredImplicitConnectivity_h
31#define vtkStructuredImplicitConnectivity_h
32
33#include "vtkFiltersParallelMPIModule.h" // For export macro
34#include "vtkObject.h"
35
36// Forward declarations
37VTK_ABI_NAMESPACE_BEGIN
38class vtkDataArray;
39class vtkImageData;
42class vtkPointData;
43class vtkPoints;
46VTK_ABI_NAMESPACE_END
47
48namespace vtk
49{
50namespace detail
51{
52VTK_ABI_NAMESPACE_BEGIN
53
54class CommunicationManager;
55struct DomainMetaData;
56struct StructuredGrid;
57
58VTK_ABI_NAMESPACE_END
59} // END namespace detail
60} // END namespace vtk
61
62VTK_ABI_NAMESPACE_BEGIN
63class VTKFILTERSPARALLELMPI_EXPORT vtkStructuredImplicitConnectivity : public vtkObject
64{
65public:
67 void PrintSelf(ostream& os, vtkIndent indent) override;
69
76 void SetWholeExtent(int wholeExt[6]);
77
78 // \brief Registers the structured grid dataset belonging to this process.
79 // \param gridID the ID of the grid in this rank.
80 // \param extent the [imin,imax,jmin,jmax,kmin,kmax] of the grid.
81 // \param gridPnts pointer to the points of the grid (nullptr for uniform grid).
82 // \param pointData pointer to the node-centered fields of the grid.
83 // \pre gridID >= 0. The code uses values of gridID < -1 as flag internally.
84 // \pre vtkStructuredExtent::Smaller(extent,wholeExtent) == true.
85 // \note A rank with no or an empty grid, should not call this method.
86 void RegisterGrid(int gridID, int extent[6], vtkPoints* gridPnts, vtkPointData* pointData);
87
88 // \brief Registers the rectilinear grid dataset belonging to this process.
89 // \param gridID the ID of the in this rank.
90 // \param extent the [imin,imax,jmin,jmax,kmin,kmax] of the grid.
91 // \param xcoords the x-coordinates array of the rectilinear grid.
92 // \param ycoords the y-coordinates array of the rectilinear grid.
93 // \param zcoords the z-coordinates array of the rectilinear grid.
94 // \param pointData pointer to the node-centered fields of the grid.
95 // \pre gridID >= 0. The code uses values of gridID < -1 as flag internally.
96 // \pre vtkStructuredExtent::Smaller(extent,wholeExtent) == true.
97 // \note A rank with no or an empty grid, should not call this method.
98 void RegisterRectilinearGrid(int gridID, int extent[6], vtkDataArray* xcoords,
99 vtkDataArray* ycoords, vtkDataArray* zcoords, vtkPointData* pointData);
100
108
114
123
130
136 void GetOutputImageData(int gridID, vtkImageData* grid);
137
144
145protected:
148
151
152 vtk::detail::DomainMetaData* DomainInfo;
153 vtk::detail::StructuredGrid* InputGrid;
154 vtk::detail::StructuredGrid* OutputGrid;
155 vtk::detail::CommunicationManager* CommManager;
156
161
165 void PackData(int ext[6], vtkMultiProcessStream& bytestream);
166
170 void UnPackData(unsigned char* buffer, unsigned int size);
171
175 void AllocateBuffers(int dim);
176
181
186
191 void GrowGrid(int dim);
192
198 void UpdateNeighborList(int dim);
199
204
211
212private:
214 void operator=(const vtkStructuredImplicitConnectivity&) = delete;
215};
216VTK_ABI_NAMESPACE_END
217#endif
abstract superclass for arrays of numeric data
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Process communication using MPI.
stream used to pass data across processes using vtkMultiProcessController.
abstract base class for most VTK objects
Definition vtkObject.h:162
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:139
a dataset that is topologically regular with variable spacing in the three coordinate directions
topologically regular array of data
a distributed structured dataset that is implicitly connected among partitions without abutting.
void ConstructOutput()
Constructs the output data-structures.
void PackData(int ext[6], vtkMultiProcessStream &bytestream)
Packs the data to send into a bytestream.
void EstablishConnectivity()
Finds implicit connectivity for a distributed structured dataset.
void GrowGrid(int dim)
Grows grid along a given dimension.
static vtkStructuredImplicitConnectivity * New()
void ExchangeData()
Exchanges one layer (row or column) of data between neighboring grids to fix the implicit connectivit...
bool HasImplicitConnectivity()
Checks if there is implicit connectivity.
void SetWholeExtent(int wholeExt[6])
Sets the whole extent for the distributed structured domain.
void RegisterRectilinearGrid(int gridID, int extent[6], vtkDataArray *xcoords, vtkDataArray *ycoords, vtkDataArray *zcoords, vtkPointData *pointData)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ExchangeExtents()
Exchanges extents among processes.
void UnPackData(unsigned char *buffer, unsigned int size)
Unpacks the data to the output grid.
void GetOutputImageData(int gridID, vtkImageData *grid)
Gets the output uniform grid instance on this process.
bool GlobalDataDescriptionMatch()
Checks if the data description matches globally.
void RegisterGrid(int gridID, int extent[6], vtkPoints *gridPnts, vtkPointData *pointData)
void AllocateBuffers(int dim)
Allocates send/rcv buffers needed to carry out the communication.
void GetOutputRectilinearGrid(int gridID, vtkRectilinearGrid *grid)
Gets the output rectilinear grid instance on this process.
void GetGlobalImplicitConnectivityState()
Gets whether there is implicit connectivity across all processes.
void ComputeNeighbors()
Computes the neighbors with implicit connectivity.
vtk::detail::CommunicationManager * CommManager
void GetOutputStructuredGrid(int gridID, vtkStructuredGrid *grid)
Gets the output structured grid instance on this process.
void UpdateNeighborList(int dim)
Updates the list of neighbors after growing the grid along the given dimension dim.
void SetController(vtkMPIController *)
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.