VTK  9.1.0
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
34class vtkDataArray;
35class vtkFieldData;
37class vtkUniformGrid;
39
40class VTKCOMMONDATAMODEL_EXPORT vtkAMRUtilities : public vtkObject
41{
42public:
43 // Standard Routines
44 vtkTypeMacro(vtkAMRUtilities, vtkObject);
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
56 static void StripGhostLayers(
57 vtkOverlappingAMR* ghostedAMRData, vtkOverlappingAMR* strippedAMRData);
58
66
70 static void BlankCells(vtkOverlappingAMR* amr);
71
72protected:
73 vtkAMRUtilities() = default;
74 ~vtkAMRUtilities() override = default;
75
81 int realExtent[6], vtkUniformGrid* ghostedGrid, vtkUniformGrid* strippedGrid);
82
86 static void CopyFieldData(
87 vtkFieldData* target, vtkIdType targetIdx, vtkFieldData* source, vtkIdType sourceIdx);
88
97
98 static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
99 std::vector<std::vector<unsigned int>>& children, const std::vector<int>& processMap);
100
101private:
102 vtkAMRUtilities(const vtkAMRUtilities&) = delete;
103 void operator=(const vtkAMRUtilities&) = delete;
104
105 static void MergeGhostArrays(vtkDataArray* existingArray, vtkUnsignedCharArray* ghosts);
106};
107
108#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
Definition: vtkDataArray.h:50
represent and manipulate fields of data
Definition: vtkFieldData.h:55
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
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:332