VTK  9.2.6
vtkDIYGhostUtilities.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDIYGhostUtilities.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
71#ifndef vtkDIYGhostUtilities_h
72#define vtkDIYGhostUtilities_h
73
74#include "vtkBoundingBox.h" // For ComputeLinkMap
75#include "vtkDIYExplicitAssigner.h" // For DIY assigner
76#include "vtkDIYUtilities.h" // For Block
77#include "vtkObject.h"
78#include "vtkParallelDIYModule.h" // For export macros
79#include "vtkQuaternion.h" // For vtkImageData
80#include "vtkSmartPointer.h" // For vtkSmartPointer
81
82#include <array> // For VectorType and ExtentType
83#include <map> // For BlockMapType
84#include <set> // For Link
85#include <vector> // For LinkMap
86
87// clang-format off
88#include "vtk_diy2.h" // Third party include
89#include VTK_DIY2(diy/assigner.hpp)
90#include VTK_DIY2(diy/master.hpp)
91#include VTK_DIY2(diy/partners/all-reduce.hpp)
92// clang-format on
93
95class vtkAlgorithm;
96class vtkCellArray;
97class vtkDataArray;
98class vtkDataSet;
99class vtkFieldData;
100class vtkIdList;
101class vtkIdTypeArray;
102class vtkImageData;
103class vtkMatrix3x3;
105class vtkPoints;
106class vtkPointSet;
107class vtkPolyData;
112
113class VTKPARALLELDIY_EXPORT vtkDIYGhostUtilities : public vtkObject
114{
115public:
117 void PrintSelf(ostream& os, vtkIndent indent) override;
118
120
123 using VectorType = std::array<double, 3>;
125 using ExtentType = std::array<int, 6>;
126 template <class T>
127 using BlockMapType = std::map<int, T>;
128 using Links = std::set<int>;
129 using LinkMap = std::vector<Links>;
131
136 template <class DataSetT>
138
139protected:
148
150 {
154 virtual bool InputNeedsGhostsPeeledOff() const = 0;
155 };
156
161 {
165 GridBlockStructure(const int* extent, int dim);
166
170 ExtentType Extent = ExtentType{ 1, -1, 1, -1, 1, -1 };
171
177
182
183 ExtentType ReceivedGhostExtent = ExtentType{ 1, -1, 1, -1, 1, -1 };
184
189 unsigned char AdjacencyMask;
190
195 };
196
201 {
202 bool InputNeedsGhostsPeeledOff() const override { return this->Extent != this->InputExtent; }
203
207 ExtentType Extent = ExtentType{ 1, -1, 1, -1, 1, -1 };
208
212 ExtentType InputExtent = ExtentType{ 1, -1, 1, -1, 1, -1 };
213
215 };
216
221
227 {
229
233 ImageDataBlockStructure(const int extent[6], int dim, const double origin[3],
234 const double spacing[3], const double orientationQuaternion[4]);
235 ImageDataBlockStructure(const int extent[6], int dim, const double origin[3],
236 const double spacing[3], vtkMatrix3x3* directionMatrix);
238
243
248
253
258 };
259
280
308
341
347 {
352 StructuredGridBlockStructure(const int extent[6], int dim, vtkDataArray* points[6]);
353
358
363
368 struct Grid2D
369 {
373 int StartX = 0;
374
378 int StartY = 0;
379
383 int EndX = 0;
384
388 int EndY = 0;
389
394
399
404 int ExtentId = -1;
405 };
406
413
418 };
419
489
561
591
616
672
713
714public:
723 template <class BlockStructureT, class InformationT>
752
754
764
773 template <class DataSetT>
774 static int GenerateGhostCells(std::vector<DataSetT*>& inputsDS, std::vector<DataSetT*>& outputsDS,
775 int outputGhostLevels, vtkMultiProcessController* controller);
776
778
783 static int GenerateGhostCellsImageData(std::vector<vtkImageData*>& inputs,
784 std::vector<vtkImageData*>& outputs, int outputGhostLevels,
785 vtkMultiProcessController* controller);
786 static int GenerateGhostCellsRectilinearGrid(std::vector<vtkRectilinearGrid*>& inputs,
787 std::vector<vtkRectilinearGrid*>& outputs, int outputGhostLevels,
788 vtkMultiProcessController* controller);
789 static int GenerateGhostCellsStructuredGrid(std::vector<vtkStructuredGrid*>& inputs,
790 std::vector<vtkStructuredGrid*>& outputs, int outputGhostLevels,
791 vtkMultiProcessController* controller);
792 static int GenerateGhostCellsPolyData(std::vector<vtkPolyData*>& inputs,
793 std::vector<vtkPolyData*>& outputs, int outputGhostLevels,
794 vtkMultiProcessController* controller);
795 static int GenerateGhostCellsUnstructuredGrid(std::vector<vtkUnstructuredGrid*>& inputs,
796 std::vector<vtkUnstructuredGrid*>& outputs, int outputGhostLevels,
797 vtkMultiProcessController* controller);
799
800protected:
803
807 static void ReinitializeSelectedBits(vtkUnsignedCharArray* ghosts, unsigned char mask);
808
813 template <class DataSetT>
815 typename DataSetTypeToBlockTypeConverter<DataSetT>::BlockType* block, DataSetT* output);
816
821 template <class DataSetT>
823 typename DataSetTypeToBlockTypeConverter<DataSetT>::BlockType* block, DataSetT* output);
824
826
830 std::vector<vtkImageData*>& inputs, std::vector<vtkImageData*>& outputs);
832 std::vector<vtkRectilinearGrid*>& inputs, std::vector<vtkRectilinearGrid*>& outputs);
834 std::vector<vtkStructuredGrid*>& inputs, std::vector<vtkStructuredGrid*>& outputs);
836 std::vector<vtkUnstructuredGrid*>& inputs, std::vector<vtkUnstructuredGrid*>& outputs);
838 std::vector<vtkPolyData*>& inputs, std::vector<vtkPolyData*>& outputs);
840
842
848 static void InitializeBlocks(diy::Master& master, std::vector<vtkImageData*>& inputs);
849 static void InitializeBlocks(diy::Master& master, std::vector<vtkRectilinearGrid*>& inputs);
850 static void InitializeBlocks(diy::Master& master, std::vector<vtkStructuredGrid*>& inputs);
851 static void InitializeBlocks(diy::Master& master, std::vector<vtkUnstructuredGrid*>& inputs);
852 static void InitializeBlocks(diy::Master& master, std::vector<vtkPolyData*>& inputs);
854
858 template <class DataSetT>
860 diy::Master& master, const vtkDIYExplicitAssigner& assigner, std::vector<DataSetT*>& inputs);
861
862 template <class BlockT>
863 static LinkMap ComputeLinkMapUsingBoundingBoxes(const diy::Master& master);
864
866
872 static void ExchangeBlockStructures(diy::Master& master, std::vector<vtkImageData*>& inputs);
874 diy::Master& master, std::vector<vtkRectilinearGrid*>& inputs);
875 static void ExchangeBlockStructures(diy::Master& master, std::vector<vtkStructuredGrid*>& inputs);
877 diy::Master& master, std::vector<vtkUnstructuredGrid*>& inputs);
878 static void ExchangeBlockStructures(diy::Master& master, std::vector<vtkPolyData*>& inputs);
880
882
888 const diy::Master& master, std::vector<vtkImageData*>& inputs, int outputGhostLevels);
890 const diy::Master& master, std::vector<vtkRectilinearGrid*>& inputs, int outputGhostLevels);
892 const diy::Master& master, std::vector<vtkStructuredGrid*>& inputs, int outputGhostLevels);
894 const diy::Master& master, std::vector<vtkUnstructuredGrid*>& inputs, int outputGhostLevels);
896 const diy::Master& master, std::vector<vtkPolyData*>& inputs, int outputGhostLevels);
898
900
904 static void EnqueueGhosts(const diy::Master::ProxyWithLink& cp, const diy::BlockID& blockId,
905 vtkImageData* input, ImageDataBlock* block);
906 static void EnqueueGhosts(const diy::Master::ProxyWithLink& cp, const diy::BlockID& blockId,
908 static void EnqueueGhosts(const diy::Master::ProxyWithLink& cp, const diy::BlockID& blockId,
910 static void EnqueueGhosts(const diy::Master::ProxyWithLink& cp, const diy::BlockID& blockId,
912 static void EnqueueGhosts(const diy::Master::ProxyWithLink& cp, const diy::BlockID& blockId,
913 vtkPolyData* input, PolyDataBlock* block);
915
917
922 static void DequeueGhosts(
923 const diy::Master::ProxyWithLink& cp, int gid, ImageDataBlockStructure& blockStructure);
924 static void DequeueGhosts(
925 const diy::Master::ProxyWithLink& cp, int gid, RectilinearGridBlockStructure& blockStructure);
926 static void DequeueGhosts(
927 const diy::Master::ProxyWithLink& cp, int gid, StructuredGridBlockStructure& blockStructure);
928 static void DequeueGhosts(
929 const diy::Master::ProxyWithLink& cp, int gid, UnstructuredGridBlockStructure& blockStructure);
930 static void DequeueGhosts(
931 const diy::Master::ProxyWithLink& cp, int gid, PolyDataBlockStructure& blockStructure);
933
938 template <class DataSetT>
939 static void CopyInputsAndAllocateGhosts(diy::Master& master, diy::Assigner& assigner,
940 diy::RegularAllReducePartners& partners, std::vector<DataSetT*>& inputs,
941 std::vector<DataSetT*>& outputs, int outputGhostLevels);
942
944
950 ImageDataBlock* block, vtkImageData* input, vtkImageData* outputs);
958 PolyDataBlock* block, vtkPolyData* input, vtkPolyData* outputs);
960
964 template <class DataSetT>
965 static void ExchangeGhosts(diy::Master& master, std::vector<DataSetT*>& inputs);
966
970 template <class DataSetT>
972 diy::Master& master, std::vector<DataSetT*>& outputs, int outputGhostLevels);
973
978 template <class DataSetT>
979 static void AddGhostArrays(diy::Master& master, std::vector<DataSetT*>& outputs);
980
982
985 static void FillGhostArrays(
986 const diy::Master& master, std::vector<vtkImageData*>& outputs, int outputGhostLevels);
987 static void FillGhostArrays(
988 const diy::Master& master, std::vector<vtkRectilinearGrid*>& outputs, int outputGhostLevels);
989 static void FillGhostArrays(
990 const diy::Master& master, std::vector<vtkStructuredGrid*>& outputs, int outputGhostLevels);
991 static void FillGhostArrays(
992 const diy::Master& master, std::vector<vtkUnstructuredGrid*>& outputs, int outputGhostLevels);
993 static void FillGhostArrays(
994 const diy::Master& master, std::vector<vtkPolyData*>& outputs, int outputGhostLevels);
996
997private:
999 void operator=(const vtkDIYGhostUtilities&) = delete;
1000
1002
1009 static void InflateBoundingBoxIfNecessary(
1010 vtkDataSet* vtkNotUsed(input), vtkBoundingBox& vtkNotUsed(bb));
1011 static void InflateBoundingBoxIfNecessary(vtkPointSet* input, vtkBoundingBox& bb);
1013};
1014
1015#include "vtkDIYGhostUtilities.txx" // for template implementations
1016
1017#endif
abstract class to quickly locate points in 3-space
Superclass for all sources, filters, and sinks in VTK.
Fast, simple class for representing and operating on 3D bounds.
object to represent cell connectivity
assigner for use with DIY
static void EnqueueGhosts(const diy::Master::ProxyWithLink &cp, const diy::BlockID &blockId, vtkImageData *input, ImageDataBlock *block)
This method enqueues ghosts between communicating blocks.
static void InitializeGhostPointArray(typename DataSetTypeToBlockTypeConverter< DataSetT >::BlockType *block, DataSetT *output)
This method will set all ghosts points in output to zero.
static void FillGhostArrays(const diy::Master &master, std::vector< vtkImageData * > &outputs, int outputGhostLevels)
This method sets the ghost arrays in the output.
static void DequeueGhosts(const diy::Master::ProxyWithLink &cp, int gid, RectilinearGridBlockStructure &blockStructure)
This method dequeues ghosts sent between communicating blocks.
static void InitializeGhostCellArray(typename DataSetTypeToBlockTypeConverter< DataSetT >::BlockType *block, DataSetT *output)
This method will set all ghosts cells in output to zero.
static void DeepCopyInputAndAllocateGhosts(UnstructuredGridBlock *block, vtkUnstructuredGrid *input, vtkUnstructuredGrid *outputs)
Method to be overloaded for each supported input data set type, This method allocates ghosts in the o...
static void DeepCopyInputAndAllocateGhosts(PolyDataBlock *block, vtkPolyData *input, vtkPolyData *outputs)
Method to be overloaded for each supported input data set type, This method allocates ghosts in the o...
static void FillGhostArrays(const diy::Master &master, std::vector< vtkRectilinearGrid * > &outputs, int outputGhostLevels)
This method sets the ghost arrays in the output.
static void ExchangeBlockStructures(diy::Master &master, std::vector< vtkRectilinearGrid * > &inputs)
Method to be overloaded for each supported type of input data set.
static LinkMap ComputeLinkMap(const diy::Master &master, std::vector< vtkRectilinearGrid * > &inputs, int outputGhostLevels)
Method to be overloaded for each supported input data set type, that computes the minimal link map be...
static LinkMap ComputeLinkMap(const diy::Master &master, std::vector< vtkUnstructuredGrid * > &inputs, int outputGhostLevels)
Method to be overloaded for each supported input data set type, that computes the minimal link map be...
static void FillGhostArrays(const diy::Master &master, std::vector< vtkStructuredGrid * > &outputs, int outputGhostLevels)
This method sets the ghost arrays in the output.
static void DequeueGhosts(const diy::Master::ProxyWithLink &cp, int gid, UnstructuredGridBlockStructure &blockStructure)
This method dequeues ghosts sent between communicating blocks.
static void InitializeBlocks(diy::Master &master, std::vector< vtkStructuredGrid * > &inputs)
Method to be overloaded for each supported type of input data set.
static void ExchangeGhosts(diy::Master &master, std::vector< DataSetT * > &inputs)
This method exchanges ghosts between connected blocks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void CloneGeometricStructures(std::vector< vtkUnstructuredGrid * > &inputs, std::vector< vtkUnstructuredGrid * > &outputs)
static void InitializeBlocks(diy::Master &master, std::vector< vtkUnstructuredGrid * > &inputs)
Method to be overloaded for each supported type of input data set.
static void CloneGeometricStructures(std::vector< vtkImageData * > &inputs, std::vector< vtkImageData * > &outputs)
static int GenerateGhostCellsRectilinearGrid(std::vector< vtkRectilinearGrid * > &inputs, std::vector< vtkRectilinearGrid * > &outputs, int outputGhostLevels, vtkMultiProcessController *controller)
Block typedefs.
Block< RectilinearGridBlockStructure, RectilinearGridInformation > RectilinearGridBlock
Block typedefs.
static void ReinitializeSelectedBits(vtkUnsignedCharArray *ghosts, unsigned char mask)
Reinitializes the bits that match the input bit mask in the input array to zero.
static void DeepCopyInputAndAllocateGhosts(StructuredGridBlock *block, vtkStructuredGrid *input, vtkStructuredGrid *outputs)
Method to be overloaded for each supported input data set type, This method allocates ghosts in the o...
static void CloneGeometricStructures(std::vector< vtkPolyData * > &inputs, std::vector< vtkPolyData * > &outputs)
static void InitializeBlocks(diy::Master &master, std::vector< vtkImageData * > &inputs)
Method to be overloaded for each supported type of input data set.
static void CloneGeometricStructures(std::vector< vtkStructuredGrid * > &inputs, std::vector< vtkStructuredGrid * > &outputs)
static int GenerateGhostCellsStructuredGrid(std::vector< vtkStructuredGrid * > &inputs, std::vector< vtkStructuredGrid * > &outputs, int outputGhostLevels, vtkMultiProcessController *controller)
Block typedefs.
std::set< int > Links
Convenient typedefs.
static void DequeueGhosts(const diy::Master::ProxyWithLink &cp, int gid, ImageDataBlockStructure &blockStructure)
This method dequeues ghosts sent between communicating blocks.
static void EnqueueGhosts(const diy::Master::ProxyWithLink &cp, const diy::BlockID &blockId, vtkPolyData *input, PolyDataBlock *block)
This method enqueues ghosts between communicating blocks.
Block< PolyDataBlockStructure, PolyDataInformation > PolyDataBlock
Block typedefs.
static void CopyInputsAndAllocateGhosts(diy::Master &master, diy::Assigner &assigner, diy::RegularAllReducePartners &partners, std::vector< DataSetT * > &inputs, std::vector< DataSetT * > &outputs, int outputGhostLevels)
Copy the inputs into the outputs.
static void InitializeBlocks(diy::Master &master, std::vector< vtkPolyData * > &inputs)
Method to be overloaded for each supported type of input data set.
static void InitializeGhostArrays(diy::Master &master, std::vector< DataSetT * > &outputs, int outputGhostLevels)
This methods allocate a point and cell ghost array and fills it with 0.
static void ExchangeBoundingBoxes(diy::Master &master, const vtkDIYExplicitAssigner &assigner, std::vector< DataSetT * > &inputs)
This method exchanges the bounding boxes among blocks.
static void FillGhostArrays(const diy::Master &master, std::vector< vtkUnstructuredGrid * > &outputs, int outputGhostLevels)
This method sets the ghost arrays in the output.
static int GenerateGhostCellsPolyData(std::vector< vtkPolyData * > &inputs, std::vector< vtkPolyData * > &outputs, int outputGhostLevels, vtkMultiProcessController *controller)
Block typedefs.
static void DeepCopyInputAndAllocateGhosts(ImageDataBlock *block, vtkImageData *input, vtkImageData *outputs)
Method to be overloaded for each supported input data set type, This method allocates ghosts in the o...
~vtkDIYGhostUtilities() override
static void EnqueueGhosts(const diy::Master::ProxyWithLink &cp, const diy::BlockID &blockId, vtkUnstructuredGrid *input, UnstructuredGridBlock *block)
This method enqueues ghosts between communicating blocks.
vtkQuaternion< double > QuaternionType
Convenient typedefs.
static LinkMap ComputeLinkMap(const diy::Master &master, std::vector< vtkStructuredGrid * > &inputs, int outputGhostLevels)
Method to be overloaded for each supported input data set type, that computes the minimal link map be...
static void EnqueueGhosts(const diy::Master::ProxyWithLink &cp, const diy::BlockID &blockId, vtkStructuredGrid *input, StructuredGridBlock *block)
This method enqueues ghosts between communicating blocks.
static int GenerateGhostCellsImageData(std::vector< vtkImageData * > &inputs, std::vector< vtkImageData * > &outputs, int outputGhostLevels, vtkMultiProcessController *controller)
Method that can be used to avoid the compile-time overhead of the templated method GenerateGhostCells...
static void CloneGeometricStructures(std::vector< vtkRectilinearGrid * > &inputs, std::vector< vtkRectilinearGrid * > &outputs)
static void FillGhostArrays(const diy::Master &master, std::vector< vtkPolyData * > &outputs, int outputGhostLevels)
This method sets the ghost arrays in the output.
static void DequeueGhosts(const diy::Master::ProxyWithLink &cp, int gid, StructuredGridBlockStructure &blockStructure)
This method dequeues ghosts sent between communicating blocks.
static void ExchangeBlockStructures(diy::Master &master, std::vector< vtkImageData * > &inputs)
Method to be overloaded for each supported type of input data set.
std::array< double, 3 > VectorType
Convenient typedefs.
Block< UnstructuredDataBlockStructure, UnstructuredDataInformation > UnstructuredDataBlock
Block typedefs.
std::map< int, T > BlockMapType
Convenient typedefs.
Block< UnstructuredGridBlockStructure, UnstructuredGridInformation > UnstructuredGridBlock
Block typedefs.
Block< StructuredGridBlockStructure, StructuredGridInformation > StructuredGridBlock
Block typedefs.
std::array< int, 6 > ExtentType
Convenient typedefs.
static void ExchangeBlockStructures(diy::Master &master, std::vector< vtkPolyData * > &inputs)
Method to be overloaded for each supported type of input data set.
static void DequeueGhosts(const diy::Master::ProxyWithLink &cp, int gid, PolyDataBlockStructure &blockStructure)
This method dequeues ghosts sent between communicating blocks.
static void ExchangeBlockStructures(diy::Master &master, std::vector< vtkUnstructuredGrid * > &inputs)
Method to be overloaded for each supported type of input data set.
static LinkMap ComputeLinkMap(const diy::Master &master, std::vector< vtkPolyData * > &inputs, int outputGhostLevels)
Method to be overloaded for each supported input data set type, that computes the minimal link map be...
std::vector< Links > LinkMap
Convenient typedefs.
Block< ImageDataBlockStructure, ImageDataInformation > ImageDataBlock
Block typedefs.
static void AddGhostArrays(diy::Master &master, std::vector< DataSetT * > &outputs)
Adds ghost arrays, which are present in blocks of master, to outputs point and / or cell data.
static void EnqueueGhosts(const diy::Master::ProxyWithLink &cp, const diy::BlockID &blockId, vtkRectilinearGrid *input, RectilinearGridBlock *block)
This method enqueues ghosts between communicating blocks.
static int GenerateGhostCellsUnstructuredGrid(std::vector< vtkUnstructuredGrid * > &inputs, std::vector< vtkUnstructuredGrid * > &outputs, int outputGhostLevels, vtkMultiProcessController *controller)
Block typedefs.
static void DeepCopyInputAndAllocateGhosts(RectilinearGridBlock *block, vtkRectilinearGrid *input, vtkRectilinearGrid *outputs)
Method to be overloaded for each supported input data set type, This method allocates ghosts in the o...
static LinkMap ComputeLinkMapUsingBoundingBoxes(const diy::Master &master)
static LinkMap ComputeLinkMap(const diy::Master &master, std::vector< vtkImageData * > &inputs, int outputGhostLevels)
Method to be overloaded for each supported input data set type, that computes the minimal link map be...
static void InitializeBlocks(diy::Master &master, std::vector< vtkRectilinearGrid * > &inputs)
Method to be overloaded for each supported type of input data set.
static int GenerateGhostCells(std::vector< DataSetT * > &inputsDS, std::vector< DataSetT * > &outputsDS, int outputGhostLevels, vtkMultiProcessController *controller)
Main pipeline generating ghosts.
static void ExchangeBlockStructures(diy::Master &master, std::vector< vtkStructuredGrid * > &inputs)
Method to be overloaded for each supported type of input data set.
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
represent and manipulate fields of data
list of point or cell ids
Definition vtkIdList.h:31
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:34
represent and manipulate 3x3 transformation matrices
Multiprocessing communication superclass.
Allocate and hold a VTK object.
Definition vtkNew.h:56
concrete class for storing a set of points
Definition vtkPointSet.h:67
represent and manipulate 3D points
Definition vtkPoints.h:34
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
templated base type for storage of quaternions.
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
topologically regular array of data
dynamic, self-adjusting array of unsigned char
dataset represents arbitrary combinations of all possible cell types
Block structure to be used for diy communication.
BlockStructureT BlockStructureType
Typedef handle on block structure and block information.
InformationT InformationType
Typedef handle on block structure and block information.
Base block structure for data sets.
vtkSmartPointer< vtkFieldData > GhostCellData
vtkSmartPointer< vtkFieldData > GhostPointData
virtual bool InputNeedsGhostsPeeledOff() const =0
This helper structure owns a typedef to the block type of DataSetT used with diy to generate ghosts.
GridBlockStructure(const int *extent, int dim)
GridBlockStructure constructor.
ExtentType ShiftedExtentWithNewGhosts
Extent of neighboring block that include ghost layers, shifted to match our mapping of the extent in ...
ExtentType Extent
Extent of neighboring block with no ghosts.
ExtentType ShiftedExtent
Extent of the neighboring block, shifted to match our mapping of the extent in the 3D world.
int DataDimension
This stores the dimension of the grid (1D, 2D, or 3D).
unsigned char AdjacencyMask
Binary mask encoding the adjacency of the neighboring block w.r.t.
Structure storing information needed by a block on it's own grid structure.
ExtentType Extent
Extent without ghost layers.
ExtentType InputExtent
Input extent without any modification.
Block structure storing information being communicated by neighboring blocks for vtkImageData.
VectorType Origin
Origin of the neighboring vtkImageData.
ImageDataBlockStructure(vtkImageData *image, const ImageDataInformation &info)
Copy constructor.
VectorType Spacing
Spacing of the neighboring vtkImageData.
ImageDataBlockStructure(const int extent[6], int dim, const double origin[3], const double spacing[3], vtkMatrix3x3 *directionMatrix)
Constructor taking the extent (without ghosts) of the neighboring vtkImageData, as well as well as th...
QuaternionType OrientationQuaternion
Orientation of the neighboring vtkImageData.
ImageDataBlockStructure(const int extent[6], int dim, const double origin[3], const double spacing[3], const double orientationQuaternion[4])
Constructor taking the extent (without ghosts) of the neighboring vtkImageData, as well as well as th...
vtkIdType NumberOfStripsToSend
Handle on the number of cells to send of the corresponding type.
vtkNew< vtkIdList > StripIdsToSend
This lists the ids of the cells that we own and need to send to the current neighboring block.
vtkIdType StripConnectivitySize
Handle on the number of cells of corresponding type to be sent to the neighbor block.
vtkIdType PolyConnectivitySize
Handle on the number of cells of corresponding type to be sent to the neighbor block.
vtkNew< vtkIdList > LineIdsToSend
This lists the ids of the cells that we own and need to send to the current neighboring block.
vtkIdType NumberOfLinesToSend
Handle on the number of cells to send of the corresponding type.
vtkIdType LineConnectivitySize
Handle on the number of cells of corresponding type to be sent to the neighbor block.
vtkIdType NumberOfPolysToSend
Handle on the number of cells to send of the corresponding type.
vtkNew< vtkIdList > PolyIdsToSend
This lists the ids of the cells that we own and need to send to the current neighboring block.
vtkIdType CurrentMaxStripId
This is a cursor telling how many cells of corresponding types have been added so far.
vtkIdType CurrentMaxPolyId
This is a cursor telling how many cells of corresponding types have been added so far.
vtkIdType CurrentPolyConnectivitySize
This is a cursor telling how much the corresponding output connectivity array is filled.
vtkIdType NumberOfInputPolys
Number of cells of respective type when the input has its ghost cells removed.
vtkIdType NumberOfInputVerts
Number of cells of respective type when the input has its ghost cells removed.
vtkIdType CurrentLineConnectivitySize
This is a cursor telling how much the corresponding output connectivity array is filled.
vtkIdType NumberOfInputStrips
Number of cells of respective type when the input has its ghost cells removed.
vtkNew< vtkIdList > OutputToInputLineCellIdRedirectionMap
Cell connectivity array size of the input if ghost cells are removed.
vtkNew< vtkIdList > OutputToInputStripCellIdRedirectionMap
Cell connectivity array size of the input if ghost cells are removed.
vtkIdType CurrentStripConnectivitySize
This is a cursor telling how much the corresponding output connectivity array is filled.
vtkIdType InputPolyConnectivitySize
Cell connectivity array size of the input if ghost cells are removed.
vtkIdType NumberOfInputLines
Number of cells of respective type when the input has its ghost cells removed.
vtkIdType InputStripConnectivitySize
Cell connectivity array size of the input if ghost cells are removed.
vtkNew< vtkIdList > OutputToInputVertCellIdRedirectionMap
In the event that the input has ghost cells, this maps the output cells (with input ghosts removed) t...
vtkIdType InputLineConnectivitySize
Cell connectivity array size of the input if ghost cells are removed.
vtkIdType CurrentMaxLineId
This is a cursor telling how many cells of corresponding types have been added so far.
vtkNew< vtkIdList > OutputToInputPolyCellIdRedirectionMap
Cell connectivity array size of the input if ghost cells are removed.
vtkIdType InputVertConnectivitySize
Cell connectivity array size of the input if ghost cells are removed.
Block structure storing information being communicated by neighboring blocks for vtkRectilinearGrid.
vtkSmartPointer< vtkDataArray > ZCoordinates
Point coordinate arrays of the rectilinear grid.
vtkSmartPointer< vtkDataArray > YCoordinates
Point coordinate arrays of the rectilinear grid.
vtkSmartPointer< vtkDataArray > XCoordinates
Point coordinate arrays of the rectilinear grid.
RectilinearGridBlockStructure(vtkRectilinearGrid *grid, const RectilinearGridInformation &info)
Copy constructor.
RectilinearGridBlockStructure(const int extent[6], int dim, vtkDataArray *xCoordinates, vtkDataArray *yCoordinates, vtkDataArray *zCoordinates)
Constructor taking the extent (without ghosts) of the neighboring vtkRectilinearGrid,...
vtkSmartPointer< vtkDataArray > YCoordinates
Point coordinates without ghosts.
vtkSmartPointer< vtkDataArray > XCoordinates
Point coordinates without ghosts.
vtkSmartPointer< vtkDataArray > CoordinateGhosts[6]
Coordinates of ghosts copied from connected neighbors.
vtkSmartPointer< vtkDataArray > ZCoordinates
Point coordinates without ghosts.
int ExtentId
Index of the extent of the current grid.
int EndY
End point extent coordinate in the y dimension.
int StartY
Start point extent coordinate in the y dimension.
int EndX
End point extent coordinate in the x dimension.
int StartX
Start point extent coordinate in the x dimension.
Block structure storing information being communicated by neighboring blocks for vtkStructuredGrid.
vtkNew< vtkPoints > GhostPoints
Buffer to store received ghost points from neighboring blocks.
vtkSmartPointer< vtkPoints > OuterPointLayers[6]
Point coordinate arrays of the structured grid.
StructuredGridBlockStructure(vtkStructuredGrid *grid, const StructuredGridInformation &info)
Copy constructor.
StructuredGridBlockStructure(const int extent[6], int dim, vtkDataArray *points[6])
Constructor taking the extent (without ghosts) of the neighboring vtkStructuredGrid,...
This structure represents the set of points and their corresponding extent of an external face of the...
ExtentType Extent
Extent (which represents a 2D, 1D, or 0D grid), of an external face.
vtkSmartPointer< vtkPoints > Points
Points of an external face.
OuterPointLayersType OuterPointLayers[6]
Array of 6 external faces.
vtkPoints * InputPoints
Handle on input points for current block.
vtkSmartPointer< vtkIdTypeArray > GhostGlobalPointIds
Point global ids sent to us by neighboring block, if present.
std::map< vtkIdType, vtkIdType > RedirectionMapForDuplicatePointIds
This is a mapping from points that have been sent by the current neighboring block and have already b...
vtkNew< vtkIdList > PointIdsToSend
This lists the ids of the points that we own and need to send to the current neighboring block.
vtkSmartPointer< vtkIdTypeArray > ReceivedSharedPointIds
It can happen that a point can be sent by multiple blocks.
vtkNew< vtkIdTypeArray > SharedPointIds
It can happen that a point can be sent by multiple blocks.
vtkNew< vtkIdList > MatchingReceivedPointIds
This lists the matching point ids to the interfacing points that are exchanged with current neighbori...
vtkNew< vtkIdList > CellIdsToSend
This lists the ids of the cells that we own and need to send to the current neighboring block.
vtkNew< vtkIdList > RemappedMatchingReceivedPointIdsSortedLikeTarget
This array describes the same points as MatchingReceivedPointIds, but points are ordered like in the ...
vtkNew< vtkPoints > GhostPoints
Ghost points sent by the current neighboring block.
vtkNew< vtkPoints > InterfacingPoints
These are the interfacing points sent by the current neighboring block.
vtkSmartPointer< vtkIdTypeArray > InterfacingGlobalPointIds
Point global ids of the interfacing surface sent to us by corresponding block, if present.
vtkSmartPointer< vtkFieldData > InterfacingPointData
Point data at the interface sent by our neighbor.
vtkIdTypeArray * InterfacePointIds
Handle to the local point ids of the surface of the input.
vtkSmartPointer< vtkIdList > InputToOutputPointIdRedirectionMap
When the input has ghosts, this map is being used to copy input points / point data into the output (...
vtkIdType NumberOfInputPoints
Number of input points / cell in the input when ghosts are removed.
vtkSmartPointer< vtkIdList > OutputToInputCellIdRedirectionMap
When the input has ghosts, this map is being used to copy input cells / cell data into the output (wi...
vtkIdType NumberOfInputCells
Number of input points / cell in the input when ghosts are removed.
vtkDataArray * InterfacePoints
Handle to the points of the surface of the input.
vtkSmartPointer< vtkAlgorithm > InterfaceExtractor
Filter that is being used to extract the surface of the input.
vtkSmartPointer< vtkIdTypeArray > InterfaceGlobalPointIds
Handle to the point ids of the input surface, if present.
vtkSmartPointer< vtkIdList > OutputToInputPointIdRedirectionMap
When the input has ghosts, this map is being used to copy input points / point data into the output (...
vtkBoundingBox BoundingBox
Bounding box of input.
vtkIdType FacesSize
Handle to the faces / connectivity size that we have to send to the neighboring block.
vtkIdType ConnectivitySize
Handle to the faces / connectivity size that we have to send to the neighboring block.
vtkIdType InputConnectivitySize
Cell connectivity array size of the input if the ghost cells are removed.
vtkIdType CurrentConnectivitySize
This is a cursor telling how much the output connectivity array is filled.
vtkIdType InputFacesSize
Faces array size of the input if the ghost cells are removed.
vtkIdType CurrentFacesSize
This is a cursor telling the amount of faces information, that has already been added to the output.
#define vtkDataArray
int vtkIdType
Definition vtkType.h:332