OpenFOAM
9
The OpenFOAM Foundation
cellModelIO.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
\*---------------------------------------------------------------------------*/
25
26
#include "
cellModel.H
"
27
#include "
dictionaryEntry.H
"
28
29
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30
31
Foam::cellModel::cellModel
(
Istream
& is)
32
{
33
dictionaryEntry
entry
(
dictionary::null
, is);
34
name_ = entry.
keyword
();
35
entry.
lookup
(
"index"
) >> index_;
36
entry.
lookup
(
"numberOfPoints"
) >> nPoints_;
37
entry.
lookup
(
"faces"
) >> faces_;
38
entry.
lookup
(
"edges"
) >> edges_;
39
}
40
41
42
Foam::Ostream
&
Foam::operator<<
(
Ostream
& os,
const
cellModel
&
c
)
43
{
44
os <<
"name"
<<
tab
<< c.name_ <<
tab
45
<<
"index"
<<
tab
<< c.index_ <<
tab
46
<<
"numberOfPoints"
<<
tab
<< c.nPoints_ <<
tab
47
<<
"faces"
<<
tab
<< c.faces_ <<
tab
48
<<
"edges"
<<
tab
<< c.edges_ <<
endl
;
49
50
return
os;
51
}
52
53
54
template
<>
55
Foam::Ostream
& Foam::operator<<(Ostream& os, const InfoProxy<cellModel>& ip)
56
{
57
const
cellModel
& cm = ip.t_;
58
59
os <<
"name = "
<< cm.
name
() <<
", "
60
<<
"index = "
<< cm.
index
() <<
", "
61
<<
"number of points = "
<< cm.
nPoints
() <<
", "
62
<<
"number of faces = "
<< cm.
nFaces
() <<
", "
63
<<
"number of edges = "
<< cm.
nEdges
()
64
<<
endl
;
65
66
return
os;
67
}
68
69
70
// ************************************************************************* //
Foam::cellModel::nFaces
label nFaces() const
Return number of faces.
Definition:
cellModelI.H:62
Foam::entry::keyword
const keyType & keyword() const
Return keyword.
Definition:
entry.H:123
Foam::tab
static const char tab
Definition:
Ostream.H:259
Foam::cellModel::nEdges
label nEdges() const
Return number of edges.
Definition:
cellModelI.H:56
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition:
Istream.H:57
Foam::cellModel::nPoints
label nPoints() const
Return number of points.
Definition:
cellModelI.H:50
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:251
Foam::dictionaryEntry
A keyword and a list of tokens is a 'dictionaryEntry'.
Definition:
dictionaryEntry.H:64
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::dictionary::null
static const dictionary null
Null dictionary.
Definition:
dictionary.H:242
cellModel.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition:
Ostream.H:54
Foam::cellModel::index
label index() const
Return index of model in the model list.
Definition:
cellModelI.H:44
dictionaryEntry.H
Foam::operator<<
Ostream & operator<<(Ostream &, const ensightPart &)
Definition:
ensightPartIO.C:291
Foam::cellModel
Maps a geometry to a set of cell primitives, which enables geometric cell data to be calculated witho...
Definition:
cellModel.H:64
Foam::cellModel::name
const word & name() const
Return model name.
Definition:
cellModelI.H:38
Foam::entry
A keyword and a list of tokens is an 'entry'.
Definition:
entry.H:65
Foam::dictionary::lookup
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition:
dictionary.C:844
Foam::cellModel::cellModel
cellModel(Istream &)
Construct from Istream.
Definition:
cellModelIO.C:31
src
OpenFOAM
meshes
meshShapes
cellModel
cellModelIO.C
Generated by
1.8.13