OpenFOAM
v2406
The open source CFD toolbox
featureEdgeMesh.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) 2011-2017 OpenFOAM Foundation
9
Copyright (C) 2022 OpenCFD Ltd.
10
-------------------------------------------------------------------------------
11
License
12
This file is part of OpenFOAM.
13
14
OpenFOAM is free software: you can redistribute it and/or modify it
15
under the terms of the GNU General Public License as published by
16
the Free Software Foundation, either version 3 of the License, or
17
(at your option) any later version.
18
19
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27
\*---------------------------------------------------------------------------*/
28
29
#include "
featureEdgeMesh.H
"
30
31
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32
33
namespace
Foam
34
{
35
defineTypeNameAndDebug
(
featureEdgeMesh
, 0);
36
}
37
38
39
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40
41
Foam::featureEdgeMesh::featureEdgeMesh
(
const
IOobject
&
io
)
42
:
43
regIOobject
(
io
),
44
edgeMesh
()
45
{
46
if
(
isReadRequired
() || (
isReadOptional
() &&
headerOk
()))
47
{
48
readStream(typeName) >> *
this
;
49
close
();
50
}
51
52
if
(
debug
)
53
{
54
Pout
<<
"featureEdgeMesh::featureEdgeMesh :"
55
<<
" constructed from IOobject :"
56
<<
" points:"
<<
points
().
size
()
57
<<
" edges:"
<<
edges
().
size
()
58
<<
endl
;
59
}
60
}
61
62
63
Foam::featureEdgeMesh::featureEdgeMesh
64
(
65
const
IOobject&
io
,
66
const
pointField
&
points
,
67
const
edgeList
& edges
68
)
69
:
70
regIOobject
(
io
),
71
edgeMesh
(
points
, edges)
72
{}
73
74
75
Foam::featureEdgeMesh::featureEdgeMesh
76
(
77
const
IOobject
&
io
,
78
const
edgeMesh
& em
79
)
80
:
81
regIOobject
(
io
),
82
edgeMesh
(em)
83
{}
84
85
86
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
87
88
bool
Foam::featureEdgeMesh::readData
(
Istream
& is)
89
{
90
is >> *
this
;
91
return
!is.
bad
();
92
}
93
94
95
bool
Foam::featureEdgeMesh::writeData
(
Ostream
&
os
)
const
96
{
97
os
<< *
this
;
98
99
return
os
.
good
();
100
}
101
102
103
// ************************************************************************* //
Foam::featureEdgeMesh
edgeMesh + IO.
Definition:
featureEdgeMesh.H:50
Foam::UList::size
void size(const label n)
Older name for setAddressableSize.
Definition:
UList.H:116
Foam::IOstream::bad
bool bad() const noexcept
True if stream is corrupted.
Definition:
IOstream.H:305
Foam::edgeMesh::points
const pointField & points() const noexcept
Return points.
Definition:
edgeMeshI.H:92
Foam::edgeList
List< edge > edgeList
List of edge.
Definition:
edgeList.H:32
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition:
Istream.H:57
featureEdgeMesh.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:531
Foam::regIOobject::headerOk
bool headerOk()
Read and check header info. Does not check the headerClassName.
Definition:
regIOobject.C:505
Foam::IOobjectOption::isReadOptional
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
Definition:
IOobjectOption.H:346
Foam::featureEdgeMesh::writeData
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
Definition:
featureEdgeMesh.C:88
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition:
pointFieldFwd.H:38
points
const pointField & points
Definition:
gmvOutputHeader.H:1
Foam::regIOobject::close
void close()
Close Istream.
Definition:
regIOobjectRead.C:161
Foam::featureEdgeMesh::readData
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Definition:
featureEdgeMesh.C:81
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition:
Ostream.H:56
Foam::ensightOutput::debug
int debug
Static debugging option.
os
OBJstream os(runTime.globalPath()/outputName)
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::edgeMesh
Mesh data needed to do the Finite Area discretisation.
Definition:
edgeFaMesh.H:47
Foam::IOobjectOption::isReadRequired
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
Definition:
IOobjectOption.H:330
Foam::IOstream::good
bool good() const noexcept
True if next operation might succeed.
Definition:
IOstream.H:281
Foam::edgeMesh::edges
const edgeList & edges() const noexcept
Return edges.
Definition:
edgeMeshI.H:98
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition:
regIOobject.H:68
io
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition:
IOobject.H:180
Foam::featureEdgeMesh::featureEdgeMesh
featureEdgeMesh(const IOobject &)
Construct (read) given an IOobject.
Definition:
featureEdgeMesh.C:34
Foam::Pout
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
src
meshTools
edgeMesh
featureEdgeMesh
featureEdgeMesh.C
Generated by
1.8.14