fixed edge display for volume cells
[engrid-github.git] / src / libengrid / createboundarylayershell.h
blobb296686585da011a5c4334eccc80c3dc1d8cd640
1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // + +
3 // + This file is part of enGrid. +
4 // + +
5 // + Copyright 2008-2014 enGits GmbH +
6 // + +
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. +
11 // + +
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. +
16 // + +
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/>. +
19 // + +
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;
33 int m_NumIterations;
34 bool m_RemovePoints;
35 double m_RelativeHeight;
36 double m_AbsoluteHeight;
37 double m_Blending;
38 QString m_VolumeName;
39 bool m_Success;
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;
57 private: // methods
59 QList<vtkIdType> correctAdjacentBC(int bc, int num_levels = 10);
60 void prepare();
61 void createLayerNodes(vtkIdType id_node);
62 void createPrismaticGrid();
65 protected: // methods
67 virtual void operate();
69 void reduceSurface();
70 void smoothSurface();
73 public: // methods
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