1 /*=========================================================================
2 
3  Program:   Visualization Toolkit
4  Module:    vtkPStructuredGridGhostDataGenerator.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  =========================================================================*/
15 /**
16  * @class   vtkPStructuredGridGhostDataGenerator
17  *  structured grids.
18  *
19  *
20  *  A concrete implementation of vtkPDataSEtGhostGenerator for generating ghost
21  *  data on a partitioned and distributed domain of structured grids.
22  *
23  * @warning
24  *  <ol>
25  *   <li>
26  *    The input multi-block dataset must:
27  *    <ul>
28  *      <li> Have the whole-extent set </li>
29  *      <li> Each block must be an instance of vtkStructuredGrid </li>
30  *      <li> Each block must have its corresponding global extent set in the
31  *           meta-data using the PIECE_EXTENT() key </li>
32  *      <li> All blocks must have the same fields loaded </li>
33  *      <li> The multi-block structure is consistent on all processes </li>
34  *    </ul>
35  *   </li>
36  *   <li>
37  *    The code currently does not handle the following cases:
38  *    <ul>
39  *      <li>Periodic boundaries</li>
40  *      <li>Growing ghost layers beyond the extents of the neighboring grid</li>
41  *    </ul>
42  *   </li>
43  *  </ol>
44  *
45  * @sa
46  * vtkDataSetGhostGenerator, vtkStructuredGridGhostDataGenerator,
47  * vtkPDataSetGhostGenerator, vtkPUniformGridGhostDataGenerator
48  */
49 
50 #ifndef vtkPStructuredGridGhostDataGenerator_h
51 #define vtkPStructuredGridGhostDataGenerator_h
52 
53 #include "vtkDeprecation.h"                   // For VTK_DEPRECATED_IN_9_1_0
54 #include "vtkFiltersParallelGeometryModule.h" // For export macro
55 #include "vtkPDataSetGhostGenerator.h"
56 
57 class vtkMultiBlockDataSet;
58 class vtkIndent;
59 class vtkPStructuredGridConnectivity;
60 
61 class VTK_DEPRECATED_IN_9_1_0("Use vtkGhostCellsGenerator instead")
62   VTKFILTERSPARALLELGEOMETRY_EXPORT vtkPStructuredGridGhostDataGenerator
63   : public vtkPDataSetGhostGenerator
64 {
65 public:
66   static vtkPStructuredGridGhostDataGenerator* New();
67   vtkTypeMacro(vtkPStructuredGridGhostDataGenerator, vtkPDataSetGhostGenerator);
68   void PrintSelf(ostream& os, vtkIndent indent) override;
69 
70 protected:
71   vtkPStructuredGridGhostDataGenerator();
72   ~vtkPStructuredGridGhostDataGenerator() override;
73 
74   /**
75    * Registers the grid associated with this instance of multi-block.
76    */
77   void RegisterGrids(vtkMultiBlockDataSet* in);
78 
79   /**
80    * Creates the output.
81    */
82   void CreateGhostedDataSet(vtkMultiBlockDataSet* in, vtkMultiBlockDataSet* out);
83 
84   /**
85    * Generates ghost layers.
86    */
87   void GenerateGhostLayers(vtkMultiBlockDataSet* in, vtkMultiBlockDataSet* out) override;
88 
89   vtkPStructuredGridConnectivity* GridConnectivity;
90 
91 private:
92   vtkPStructuredGridGhostDataGenerator(const vtkPStructuredGridGhostDataGenerator&) = delete;
93   void operator=(const vtkPStructuredGridGhostDataGenerator&) = delete;
94 };
95 
96 #endif /* vtkPStructuredGridGhostDataGenerator_h */
97 
98 // VTK-HeaderTest-Exclude: vtkPStructuredGridGhostDataGenerator.h
99