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  =========================================================================*/
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 vtkFieldData;
41 class vtkOverlappingAMR;
42 class vtkUniformGrid;
43 
44 class VTKCOMMONDATAMODEL_EXPORT vtkAMRUtilities : public vtkObject
45 {
46 public:
47  // Standard Routines
48  vtkTypeMacro(vtkAMRUtilities,vtkObject);
49  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50 
60  static void StripGhostLayers(
61  vtkOverlappingAMR *ghostedAMRData,
62  vtkOverlappingAMR *strippedAMRData);
63 
71 
75  static void BlankCells(vtkOverlappingAMR* amr);
76 
77 protected:
79  ~vtkAMRUtilities() VTK_OVERRIDE {}
80 
86  int realExtent[6],
87  vtkUniformGrid *ghostedGrid,
88  vtkUniformGrid *strippedGrid);
89 
93  static void CopyFieldData(
94  vtkFieldData *target, vtkIdType targetIdx,
95  vtkFieldData *source, vtkIdType sourceIdx );
96 
105  vtkUniformGrid* grid, int ghost[6]);
106 
107  static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
108  std::vector<std::vector<unsigned int> >& children,
109  const std::vector<int>& processMap);
110 private:
111  vtkAMRUtilities(const vtkAMRUtilities&) VTK_DELETE_FUNCTION;
112  void operator=(const vtkAMRUtilities&) VTK_DELETE_FUNCTION;
113 };
114 
115 #endif /* vtkAMRUtilities_h */
vtkAMRUtilities::StripGhostLayers
static void StripGhostLayers(vtkOverlappingAMR *ghostedAMRData, vtkOverlappingAMR *strippedAMRData)
This method detects and strips partially overlapping cells from a given AMR dataset.
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkAMRUtilities::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:41
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkAMRUtilities
A concrete instance of vtkObject that employs a singleton design pattern and implements functionality...
Definition: vtkAMRUtilities.h:45
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:57
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:822
vtkAMRUtilities::BlankCells
static void BlankCells(vtkOverlappingAMR *amr)
Blank cells in overlapping AMR.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkAMRUtilities::vtkAMRUtilities
vtkAMRUtilities()
Definition: vtkAMRUtilities.h:78
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:47
vtkObject.h
vtkAMRUtilities::StripGhostLayersFromGrid
static vtkUniformGrid * StripGhostLayersFromGrid(vtkUniformGrid *grid, int ghost[6])
Strips ghost layers from the given grid according to the given ghost vector which encodes the number ...
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:829
vtkAMRUtilities::~vtkAMRUtilities
~vtkAMRUtilities() override
Definition: vtkAMRUtilities.h:79
vtkAMRUtilities::CopyFieldData
static void CopyFieldData(vtkFieldData *target, vtkIdType targetIdx, vtkFieldData *source, vtkIdType sourceIdx)
Copies the fields from the given source to the given target.
vtkAMRUtilities::CopyFieldsWithinRealExtent
static void CopyFieldsWithinRealExtent(int realExtent[6], vtkUniformGrid *ghostedGrid, vtkUniformGrid *strippedGrid)
Given the real-extent w.r.t.
vtkAMRUtilities::HasPartiallyOverlappingGhostCells
static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR *amr)
A quick test of whether partially overlapping ghost cells exist.
vtkAMRUtilities::BlankGridsAtLevel
static void BlankGridsAtLevel(vtkOverlappingAMR *amr, int levelIdx, std::vector< std::vector< unsigned int > > &children, const std::vector< int > &processMap)