Loading...
Searching...
No Matches
pointFeatureEdgesTypes.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
29
30// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31
33(
34 const extendedFeatureEdgeMesh& feMesh,
35 const label pointLabel
36)
37:
38 HashTable<label, extendedFeatureEdgeMesh::edgeStatus, Hash<label>>(),
39 feMesh_(feMesh),
40 pointLabel_(pointLabel)
41{}
42
43
44// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
45
48{
49 const labelList& pEds = feMesh_.pointEdges()[pointLabel_];
50
51 List<extendedFeatureEdgeMesh::edgeStatus> allEdStat(pEds.size());
52
53 forAll(pEds, i)
54 {
55 label edgeI = pEds[i];
56
57 extendedFeatureEdgeMesh::edgeStatus& eS = allEdStat[i];
58
59 eS = feMesh_.getEdgeStatus(edgeI);
60
61 this->operator()(eS)++;
62 }
63
64 return allEdStat;
65}
66
67
68// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
69
70Foam::Ostream& Foam::operator<<
71(
72 Ostream& os,
74)
75{
76 os << "Point = " << p.pointLabel_ << endl;
77
78 forAllConstIters(p, iter)
79 {
80 os << " "
82 << " = "
83 << iter.val()
84 << endl;
85 }
86
87 return os;
88}
89
90
91// ************************************************************************* //
label & operator()(const extendedFeatureEdgeMesh::edgeStatus &key)
Definition HashTableI.H:249
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
static const Enum< edgeStatus > edgeStatusNames_
Hold the types of feature edges attached to the point.
List< extendedFeatureEdgeMesh::edgeStatus > calcPointFeatureEdgesTypes()
Fill the pointFeatureEdgesType class with the types of feature.
pointFeatureEdgesTypes(const extendedFeatureEdgeMesh &feMesh, const label pointLabel)
Construct from components.
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
List< label > labelList
A List of labels.
Definition List.H:62
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition Ostream.H:519
#define forAll(list, i)
Loop across all elements in list.
Definition stdFoam.H:299
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
Definition stdFoam.H:235