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 VERTEXMESHDENSITY_H
22 #define VERTEXMESHDENSITY_H
24 #include <vtkIdList.h>
28 #include "egvtkobject.h"
30 ///\todo Rename density to edge length
31 class VertexMeshDensity
36 VertexMeshDensity();/// Default constructor
39 /** Acceptable boundary codes for neighbour nodes. Unchecked=not allowed, checked=required
40 * the first element is the boundary code
41 * the second element is the acceptance value: 0=unchecked=not allowed, 1=partially checked=does not matter, 2=checked=required
45 char type
;/// Type of the node
46 QSet
<vtkIdType
> nodeset
;/// Set of acceptable node IDs
47 // QVector<Qt::CheckState> BClist_value;// deprecated, replaced by BCmap
50 double density
;/// desired density for nodes matching all requirements
53 vtkIdType CurrentNode
;/// ID of the current node
55 /** operator to compare two VertexMeshDensity objects
57 * VMD=VMD of current node
58 * This operator is NOT SYMMETRICAL. But it can be used with indexOf.
60 bool operator==(const VertexMeshDensity
& VMD
) const;
62 void setNodes(QString str
);/// set nodeset by passing a string of the form "id1,id2,..."
64 int findSmallestVMD( QVector
<VertexMeshDensity
> vector
);
67 /// ostream operator to print out a VertexMeshDensity object
68 ostream
& operator<<(ostream
&out
, VertexMeshDensity A
);
70 /// ostream operator to print out a vector of VertexMeshDensity objects
71 ostream
& operator<<(ostream
&out
, QVector
<VertexMeshDensity
> VMDvector
);