Added getNeighbours functions to class Operation + moved UpdateMeshDensity to class...
[engrid.git] / seedsimpleprismaticlayer.h
blobb794da40fdbe9823f559f84c6578efcf1bd0b672
1 //
2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + +
4 // + This file is part of enGrid. +
5 // + +
6 // + Copyright 2008,2009 Oliver Gloth +
7 // + +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
12 // + +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
17 // + +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 // + +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 #ifndef seedsimpleprismaticlayer_H
24 #define seedsimpleprismaticlayer_H
26 class SeedSimplePrismaticLayer;
28 #include "operation.h"
30 /**
31 * The computation of the vectors providing the initial move away from the wall is not
32 * necessarily always correct.
33 * It shoud be weighted with the angle of adjacent edges and then normalised with an
34 * average edge length.
36 class SeedSimplePrismaticLayer : public Operation
39 protected: // attributes
41 QVector<vtkIdType> layer_cells;
42 QList<vtkIdType> remesh_tetras;
43 QVector<vtkIdType> vol_cells;
44 QVector<vtkIdType> prismatic_cells;
45 QVector<QVector<vtkIdType> > faces;
46 QVector<vtkIdType> old2new;
48 int N_new_points;
49 int N_new_cells;
50 int new_layer;
51 int old_layer;
52 double layer_g;
53 double layer_dg;
55 public: // methods
57 SeedSimplePrismaticLayer();
58 void setLayerCells(const QVector<vtkIdType> &cells);
59 void getLayerCells(QVector<vtkIdType> &cells);
60 void increaseLayerG(double d) { layer_g += d; layer_dg = d; };
62 protected: // methods
64 void prepareLayer();
65 void createBoundaryElements(vtkUnstructuredGrid *new_grid);
66 int countBoundaryElements();
68 virtual void operate();
72 #endif