VTK
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  =========================================================================*/
26 #ifndef vtkAMRUtilities_h
27 #define vtkAMRUtilities_h
28 
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkObject.h"
31 #include <vector> // For C++ vector
32 
33 // Forward declarations
34 class vtkFieldData;
35 class vtkOverlappingAMR;
36 class vtkUniformGrid;
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkAMRUtilities : public vtkObject
39 {
40 public:
41  // Standard Routines
42  vtkTypeMacro(vtkAMRUtilities,vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
54  static void StripGhostLayers(
55  vtkOverlappingAMR *ghostedAMRData,
56  vtkOverlappingAMR *strippedAMRData);
57 
64  static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR *amr);
65 
69  static void BlankCells(vtkOverlappingAMR* amr);
70 
71 protected:
73  ~vtkAMRUtilities() override {}
74 
79  static void CopyFieldsWithinRealExtent(
80  int realExtent[6],
81  vtkUniformGrid *ghostedGrid,
82  vtkUniformGrid *strippedGrid);
83 
87  static void CopyFieldData(
88  vtkFieldData *target, vtkIdType targetIdx,
89  vtkFieldData *source, vtkIdType sourceIdx );
90 
98  static vtkUniformGrid* StripGhostLayersFromGrid(
99  vtkUniformGrid* grid, int ghost[6]);
100 
101  static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
102  std::vector<std::vector<unsigned int> >& children,
103  const std::vector<int>& processMap);
104 private:
105  vtkAMRUtilities(const vtkAMRUtilities&) = delete;
106  void operator=(const vtkAMRUtilities&) = delete;
107 };
108 
109 #endif /* vtkAMRUtilities_h */
abstract base class for most VTK objects
Definition: vtkObject.h:53
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkAMRUtilities() override
int vtkIdType
Definition: vtkType.h:347
A concrete instance of vtkObject that employs a singleton design pattern and implements functionality...
a simple class to control print indentation
Definition: vtkIndent.h:33
image data with blanking
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
hierarchical dataset of vtkUniformGrids
represent and manipulate fields of data
Definition: vtkFieldData.h:53