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-------------------------------------------------------------------------------
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
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// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
const pointField & points() const noexcept
Return points.
Definition: edgeMeshI.H:99
const edgeList & edges() const noexcept
Return edges.
Definition: edgeMeshI.H:105
label openStart() const
Return the index of the start of the open feature edges.
label nonFeatureStart() const
Return the index of the start of the non-feature points.
label flatStart() const
Return the index of the start of the flat feature edges.
label multipleStart() const
Return the index of the start of the multiply-connected feature.
label internalStart() const
Return the index of the start of the internal feature edges.
label mixedStart() const
Return the index of the start of the mixed type feature points.
label concaveStart() const
Return the index of the start of the concave feature points.
OBJstream os(runTime.globalPath()/outputName)
void writeStats(Ostream &os, const extendedFeatureEdgeMesh &emesh)
Write some information.
Definition: edgeMeshTools.C:36
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53