VTK: Common/DataModel/vtkAMRUtilities.h Source File

| VTK 9.3.1

vtkAMRUtilities.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
29 #ifndef vtkAMRUtilities_h
30 #define vtkAMRUtilities_h
31
32 #include "vtkCommonDataModelModule.h" // For export macro
33 #include "vtkObject.h"
34 #include <vector> // For C++ vector
35
36 // Forward declarations
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkDataArray;
39 class vtkFieldData;
40 class vtkOverlappingAMR;
41 class vtkUniformGrid;
42 class vtkUnsignedCharArray;
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) override;
50
60 static void StripGhostLayers(
61 vtkOverlappingAMR* ghostedAMRData, vtkOverlappingAMR* strippedAMRData);
62
69 static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR* amr);
70
74 static void BlankCells(vtkOverlappingAMR* amr);
75
76 protected:
77 vtkAMRUtilities() = default;
78 ~vtkAMRUtilities() override = default;
79
84 static void CopyFieldsWithinRealExtent(
85 int realExtent[6], vtkUniformGrid* ghostedGrid, vtkUniformGrid* strippedGrid);
86
90 static void CopyFieldData(
91 vtkFieldData* target, vtkIdType targetIdx, vtkFieldData* source, vtkIdType sourceIdx);
92
100 static vtkUniformGrid* StripGhostLayersFromGrid(vtkUniformGrid* grid, int ghost[6]);
101
102 static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
103 std::vector<std::vector<unsigned int>>& children, const std::vector<int>& processMap);
104
105 private:
106 vtkAMRUtilities(const vtkAMRUtilities&) = delete;
107 void operator=(const vtkAMRUtilities&) = delete;
108
109 static void MergeGhostArrays(vtkDataArray* existingArray, vtkUnsignedCharArray* ghosts);
110 };
111
112 VTK_ABI_NAMESPACE_END
113 #endif /* vtkAMRUtilities_h */
vtkAMRUtilities
A concrete instance of vtkObject that employs a singleton design pattern and implements functionality...
Definition: vtkAMRUtilities.h:45
vtkAMRUtilities::StripGhostLayers
static void StripGhostLayers(vtkOverlappingAMR *ghostedAMRData, vtkOverlappingAMR *strippedAMRData)
This method detects and strips partially overlapping cells from a given AMR dataset.
vtkAMRUtilities::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAMRUtilities::~vtkAMRUtilities
~vtkAMRUtilities() override=default
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::BlankCells
static void BlankCells(vtkOverlappingAMR *amr)
Blank cells in overlapping AMR.
vtkAMRUtilities::HasPartiallyOverlappingGhostCells
static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR *amr)
A quick test of whether partially overlapping ghost cells exist.
vtkAMRUtilities::vtkAMRUtilities
vtkAMRUtilities()=default
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 ...
vtkAMRUtilities::BlankGridsAtLevel
static void BlankGridsAtLevel(vtkOverlappingAMR *amr, int levelIdx, std::vector< std::vector< unsigned int >> &children, const std::vector< int > &processMap)
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:61
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:45
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:39
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:40
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:964
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:970
vtkObject.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315