1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + This file is part of enGrid. +
5 // + Copyright 2008-2014 enGits GmbH +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef CREATEBOUNDARYLAYER_H
22 #define CREATEBOUNDARYLAYER_H
24 #include "boundarylayeroperation.h"
25 #include "guimainwindow.h"
27 class CreateBoundaryLayerShell
: public BoundaryLayerOperation
29 private: // attributes
31 QVector
<vtkIdType
> layer_cells
;
35 double m_RelativeHeight
;
36 double m_AbsoluteHeight
;
41 VolumeDefinition m_VolDef
;
42 vtkSmartPointer
<vtkUnstructuredGrid
> m_RestGrid
;
43 vtkSmartPointer
<vtkUnstructuredGrid
> m_OriginalGrid
;
44 vtkSmartPointer
<vtkUnstructuredGrid
> m_PrismaticGrid
;
47 /// Boundary codes of the surface we want to remove points on. Normally the one next to the prismatic boundary layer.
48 QSet
<int> m_LayerAdjacentBoundaryCodes
;
50 QVector
<vtkIdType
> m_ShellNodeMap
;
51 MeshPartition m_ShellPart
;
53 QMap
<int, vec3_t
> m_LayerAdjacentOrigins
;
54 QMap
<int, vec3_t
> m_LayerAdjacentNormals
;
59 QList
<vtkIdType
> correctAdjacentBC(int bc
, int num_levels
= 10);
61 void createLayerNodes(vtkIdType id_node
);
62 void createPrismaticGrid();
67 virtual void operate();
75 CreateBoundaryLayerShell();
77 void setVolumeName(QString name
) { m_VolumeName
= name
; }
78 vtkUnstructuredGrid
* getPrismaticGrid() { return m_PrismaticGrid
; }
79 QVector
<int> getBoundaryLayerCodes() { return m_BoundaryLayerCodes
; }
80 bool success() { return m_Success
; }
84 #endif // CREATEBOUNDARYLAYER_H