VTK  9.2.6
vtkAMRUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRUtilities.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  =========================================================================*/
32 #ifndef vtkAMRUtilities_h
33 #define vtkAMRUtilities_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkObject.h"
37 #include <vector> // For C++ vector
38 
39 // Forward declarations
40 class vtkDataArray;
41 class vtkFieldData;
42 class vtkOverlappingAMR;
43 class vtkUniformGrid;
45 
46 class VTKCOMMONDATAMODEL_EXPORT vtkAMRUtilities : public vtkObject
47 {
48 public:
49  // Standard Routines
50  vtkTypeMacro(vtkAMRUtilities, vtkObject);
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
62  static void StripGhostLayers(
63  vtkOverlappingAMR* ghostedAMRData, vtkOverlappingAMR* strippedAMRData);
64 
71  static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR* amr);
72 
76  static void BlankCells(vtkOverlappingAMR* amr);
77 
78 protected:
79  vtkAMRUtilities() = default;
80  ~vtkAMRUtilities() override = default;
81 
86  static void CopyFieldsWithinRealExtent(
87  int realExtent[6], vtkUniformGrid* ghostedGrid, vtkUniformGrid* strippedGrid);
88 
92  static void CopyFieldData(
93  vtkFieldData* target, vtkIdType targetIdx, vtkFieldData* source, vtkIdType sourceIdx);
94 
102  static vtkUniformGrid* StripGhostLayersFromGrid(vtkUniformGrid* grid, int ghost[6]);
103 
104  static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
105  std::vector<std::vector<unsigned int>>& children, const std::vector<int>& processMap);
106 
107 private:
108  vtkAMRUtilities(const vtkAMRUtilities&) = delete;
109  void operator=(const vtkAMRUtilities&) = delete;
110 
111  static void MergeGhostArrays(vtkDataArray* existingArray, vtkUnsignedCharArray* ghosts);
112 };
113 
114 #endif /* vtkAMRUtilities_h */
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition: vtkType.h:332
A concrete instance of vtkObject that employs a singleton design pattern and implements functionality...
a simple class to control print indentation
Definition: vtkIndent.h:39
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
dynamic, self-adjusting array of unsigned char
image data with blanking
hierarchical dataset of vtkUniformGrids
represent and manipulate fields of data
Definition: vtkFieldData.h:62