VTK  9.3.0
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
20#ifndef vtkAMRUtilities_h
21#define vtkAMRUtilities_h
22
23#include "vtkCommonDataModelModule.h" // For export macro
24#include "vtkObject.h"
25#include <vector> // For C++ vector
26
27// Forward declarations
28VTK_ABI_NAMESPACE_BEGIN
29class vtkDataArray;
30class vtkFieldData;
32class vtkUniformGrid;
34
35class VTKCOMMONDATAMODEL_EXPORT vtkAMRUtilities : public vtkObject
36{
37public:
38 // Standard Routines
39 vtkTypeMacro(vtkAMRUtilities, vtkObject);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
51 static void StripGhostLayers(
52 vtkOverlappingAMR* ghostedAMRData, vtkOverlappingAMR* strippedAMRData);
53
61
65 static void BlankCells(vtkOverlappingAMR* amr);
66
67protected:
68 vtkAMRUtilities() = default;
69 ~vtkAMRUtilities() override = default;
70
76 int realExtent[6], vtkUniformGrid* ghostedGrid, vtkUniformGrid* strippedGrid);
77
81 static void CopyFieldData(
82 vtkFieldData* target, vtkIdType targetIdx, vtkFieldData* source, vtkIdType sourceIdx);
83
92
93 static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
94 std::vector<std::vector<unsigned int>>& children, const std::vector<int>& processMap);
95
96private:
97 vtkAMRUtilities(const vtkAMRUtilities&) = delete;
98 void operator=(const vtkAMRUtilities&) = delete;
99
100 static void MergeGhostArrays(vtkDataArray* existingArray, vtkUnsignedCharArray* ghosts);
101};
102
103VTK_ABI_NAMESPACE_END
104#endif /* vtkAMRUtilities_h */
A concrete instance of vtkObject that employs a singleton design pattern and implements functionality...
static void StripGhostLayers(vtkOverlappingAMR *ghostedAMRData, vtkOverlappingAMR *strippedAMRData)
This method detects and strips partially overlapping cells from a given AMR dataset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkAMRUtilities() override=default
static void CopyFieldData(vtkFieldData *target, vtkIdType targetIdx, vtkFieldData *source, vtkIdType sourceIdx)
Copies the fields from the given source to the given target.
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 ...
static void CopyFieldsWithinRealExtent(int realExtent[6], vtkUniformGrid *ghostedGrid, vtkUniformGrid *strippedGrid)
Given the real-extent w.r.t.
static void BlankCells(vtkOverlappingAMR *amr)
Blank cells in overlapping AMR.
static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR *amr)
A quick test of whether partially overlapping ghost cells exist.
vtkAMRUtilities()=default
static void BlankGridsAtLevel(vtkOverlappingAMR *amr, int levelIdx, std::vector< std::vector< unsigned int > > &children, const std::vector< int > &processMap)
abstract superclass for arrays of numeric data
represent and manipulate fields of data
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
hierarchical dataset of vtkUniformGrids
image data with blanking
dynamic, self-adjusting array of unsigned char
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition vtkType.h:315