forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkHyperTreeGridToUnstructuredGrid.h
107 lines (89 loc) · 3.31 KB
/
vtkHyperTreeGridToUnstructuredGrid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*=========================================================================
Program: Visualization Toolkit
Module: vtkHyperTreeGridToUnstructuredGrid.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkHyperTreeGridToUnstructuredGrid
* @brief Convert hyper tree grid to
* unstructured grid.
*
JB Primal mesh
* Make explicit all leaves of a hyper tree grid by converting them to cells
* of an unstructured grid.
* Produces segments in 1D, rectangles in 2D, right hexahedra in 3D.
* NB: The output will contain superimposed inter-element boundaries and pending
* nodes as a result of T-junctions.
*
* @sa
* vtkHyperTreeGrid vtkHyperTreeGridAlgorithm
*
* @par Thanks:
* This class was written by Philippe Pebay, Joachim Pouderoux, and Charles Law, Kitware 2012
* This class was modified by Guenole Harel and Jacques-Bernard Lekien, 2014
* This class was rewritten by Philippe Pebay, 2016
* This class was modified by Jacques-Bernard Lekien, 2018
* This class was corriged (used orientation) by Jacques-Bernard Lekien, 2018
* This work was supported by Commissariat a l'Energie Atomique
* CEA, DAM, DIF, F-91297 Arpajon, France.
*/
#ifndef vtkHyperTreeGridToUnstructuredGrid_h
#define vtkHyperTreeGridToUnstructuredGrid_h
#include "vtkFiltersHyperTreeModule.h" // For export macro
#include "vtkHyperTreeGridAlgorithm.h"
class vtkBitArray;
class vtkCellArray;
class vtkHyperTreeGrid;
class vtkPoints;
class vtkUnstructuredGrid;
class vtkHyperTreeGridNonOrientedGeometryCursor;
class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridToUnstructuredGrid
: public vtkHyperTreeGridAlgorithm
{
public:
static vtkHyperTreeGridToUnstructuredGrid* New();
vtkTypeMacro(vtkHyperTreeGridToUnstructuredGrid, vtkHyperTreeGridAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) override;
protected:
vtkHyperTreeGridToUnstructuredGrid();
~vtkHyperTreeGridToUnstructuredGrid() override;
/**
* For this algorithm the output is a vtkUnstructuredGrid instance
*/
int FillOutputPortInformation(int, vtkInformation*) override;
/**
* Main routine to convert the grid of tree into an unstructured grid
*/
int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) override;
/**
* Recursively descend into tree down to leaves
*/
void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor*);
/**
* Helper method to generate a 2D or 3D cell
*/
void AddCell(vtkIdType, double*, double*);
/**
* Storage for points of output unstructured mesh
*/
vtkPoints* Points;
/**
* Storage for cells of output unstructured mesh
*/
vtkCellArray* Cells;
/**
* Storage of underlying tree
*/
unsigned int Dimension;
unsigned int Orientation;
const unsigned int* Axes;
private:
vtkHyperTreeGridToUnstructuredGrid(const vtkHyperTreeGridToUnstructuredGrid&) = delete;
void operator=(const vtkHyperTreeGridToUnstructuredGrid&) = delete;
};
#endif /* vtkHyperTreeGridToUnstructuredGrid_h */