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 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 #ifndef BOUNDARYLAYEROPERATION_H
23 #define BOUNDARYLAYEROPERATION_H
25 #include "operation.h"
26 #include "edgelengthsourcemanager.h"
28 class BoundaryLayerOperation
;
31 class BoundaryLayerOperation
: public Operation
34 protected: // data types
36 enum nodetype_t
{ NormalNode
, EdgeNode
, CornerNode
};
39 protected: // attributes
41 QVector
<vec3_t
> m_BoundaryLayerVectors
;
42 QVector
<int> m_BoundaryLayerCodes
;
43 QVector
<bool> m_BoundaryLayerNode
;
44 QVector
<nodetype_t
> m_NodeTypes
;
45 QVector
<QSet
<vtkIdType
> > m_SnapPoints
;
46 QVector
<double> m_Height
;
47 QSet
<int> m_LayerAdjacentBoundaryCodes
;
48 double m_FeatureAngle
;
49 double m_StretchingRatio
;
50 double m_FarfieldRatio
;
52 double m_MaxHeightInGaps
;
53 double m_FaceSizeLowerLimit
;
54 double m_FaceSizeUpperLimit
;
55 double m_FaceAngleLimit
;
57 double m_GroupingAngle
;
58 int m_NumBoundaryLayerVectorRelaxations
;
59 int m_NumBoundaryLayerHeightRelaxations
;
61 EdgeLengthSourceManager m_ELSManagerBLayer
;
62 EdgeLengthSourceManager m_ELSManagerSurface
;
68 void correctBoundaryLayerVectors();
69 void computeBoundaryLayerVectors();
70 void addToSnapPoints(vtkIdType id_node
, vtkIdType id_snap
);
71 void computeNodeTypes();
72 void relaxBoundaryLayerVectors();
73 void writeBoundaryLayerVectors(QString file_name
);
74 void computeDesiredHeights();
75 bool faceFine(vtkIdType id_face
, double scale
);
76 void computeHeights();
77 void limitHeights(double safety_factor
, double lower_limit
);
82 QSet
<int> getLayerAdjacentBoundaryCodes();
88 #endif // BOUNDARYLAYEROPERATION_H