fixed edge display for volume cells
[engrid-github.git] / src / libengrid / seedsimpleprismaticlayer.h
blob0d470365c359d12aeba46332155ea959c984201e
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 seedsimpleprismaticlayer_H
22 #define seedsimpleprismaticlayer_H
24 class SeedSimplePrismaticLayer;
26 #include "operation.h"
28 /**
29 * The computation of the vectors providing the initial move away from the wall is not
30 * necessarily always correct.
31 * It shoud be weighted with the angle of adjacent edges and then normalised with an
32 * average edge length.
34 class SeedSimplePrismaticLayer : public Operation
37 protected: // attributes
39 QVector<vtkIdType> layer_cells;
40 QList<vtkIdType> remesh_tetras;
41 QVector<vtkIdType> vol_cells;
42 QVector<vtkIdType> prismatic_cells;
43 QVector<QVector<vtkIdType> > faces;
44 QVector<vtkIdType> old2new;
46 int N_new_points;
47 int N_new_cells;
48 int new_layer;
49 int old_layer;
50 double layer_g;
51 double layer_dg;
53 public: // methods
55 SeedSimplePrismaticLayer();
56 void setLayerCells(const QVector<vtkIdType> &cells);
57 void getLayerCells(QVector<vtkIdType> &cells);
58 void increaseLayerG(double d) { layer_g += d; layer_dg = d; };
60 protected: // methods
62 void prepareLayer();
63 void createBoundaryElements(vtkUnstructuredGrid *new_grid);
64 int countBoundaryElements();
66 virtual void operate();
70 #endif