edgeMeshTools.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) 2017 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
28 #include "edgeMeshTools.H"
29 
31 #include "OFstream.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
36 (
37  Ostream& os,
38  const extendedFeatureEdgeMesh& emesh
39 )
40 {
41  os << "Feature set:" << nl
42  << " points : " << emesh.points().size() << nl
43  << " of which" << nl
44  << " convex : "
45  << emesh.concaveStart() << nl
46  << " concave : "
47  << (emesh.mixedStart()-emesh.concaveStart()) << nl
48  << " mixed : "
49  << (emesh.nonFeatureStart()-emesh.mixedStart()) << nl
50  << " non-feature : "
51  << (emesh.points().size()-emesh.nonFeatureStart()) << nl
52  << " edges : " << emesh.edges().size() << nl
53  << " of which" << nl
54  << " external edges : "
55  << emesh.internalStart() << nl
56  << " internal edges : "
57  << (emesh.flatStart()- emesh.internalStart()) << nl
58  << " flat edges : "
59  << (emesh.openStart()- emesh.flatStart()) << nl
60  << " open edges : "
61  << (emesh.multipleStart()- emesh.openStart()) << nl
62  << " multiply connected : "
63  << (emesh.edges().size()- emesh.multipleStart()) << endl;
64 }
65 
66 
67 // ************************************************************************* //
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::extendedEdgeMesh::multipleStart
label multipleStart() const
Return the index of the start of the multiply-connected feature.
Definition: extendedEdgeMeshI.H:78
extendedFeatureEdgeMesh.H
OFstream.H
Foam::extendedEdgeMesh::nonFeatureStart
label nonFeatureStart() const
Return the index of the start of the non-feature points.
Definition: extendedEdgeMeshI.H:48
Foam::extendedEdgeMesh::concaveStart
label concaveStart() const
Return the index of the start of the concave feature points.
Definition: extendedEdgeMeshI.H:36
Foam::edgeMesh::points
const pointField & points() const
Return points.
Definition: edgeMeshI.H:99
Foam::edgeMeshTools::writeStats
void writeStats(Ostream &os, const extendedFeatureEdgeMesh &emesh)
Write some information.
Definition: edgeMeshTools.C:36
Foam::edgeMesh::edges
const edgeList & edges() const
Return edges.
Definition: edgeMeshI.H:105
Foam::extendedEdgeMesh::internalStart
label internalStart() const
Return the index of the start of the internal feature edges.
Definition: extendedEdgeMeshI.H:60
Foam::extendedEdgeMesh::mixedStart
label mixedStart() const
Return the index of the start of the mixed type feature points.
Definition: extendedEdgeMeshI.H:42
Foam::extendedEdgeMesh::openStart
label openStart() const
Return the index of the start of the open feature edges.
Definition: extendedEdgeMeshI.H:72
Foam::nl
constexpr char nl
Definition: Ostream.H:385
edgeMeshTools.H
Foam::extendedFeatureEdgeMesh
extendedEdgeMesh + IO.
Definition: extendedFeatureEdgeMesh.H:56
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::extendedEdgeMesh::flatStart
label flatStart() const
Return the index of the start of the flat feature edges.
Definition: extendedEdgeMeshI.H:66