eddyIO.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) 2015 OpenFOAM Foundation
9 Copyright (C) 2016 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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 "eddy.H"
30#include "IOstreams.H"
31
32// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33
35:
36 patchFaceI_(readLabel(is)),
37 position0_(is),
38 x_(readScalar(is)),
39 sigma_(is),
40 alpha_(is),
41 Rpg_(is),
42 c1_(readScalar(is)),
43 dir1_(readLabel(is))
44{
46}
47
48
49// * * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * //
50
52{
53 patchFaceI_ = e.patchFaceI_;
54 position0_ = e.position0_;
55 x_ = e.x_;
56 sigma_ = e.sigma_;
57 alpha_ = e.alpha_;
58 Rpg_ = e.Rpg_;
59 c1_ = e.c1_;
60 dir1_ = e.dir1_;
61}
62
63
64// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
65
67{
69
70 is >> e.patchFaceI_
71 >> e.position0_
72 >> e.x_
73 >> e.sigma_
74 >> e.alpha_
75 >> e.Rpg_
76 >> e.c1_
77 >> e.dir1_;
78
80 return is;
81}
82
83
85{
87
88 os << e.patchFaceI_ << token::SPACE
89 << e.position0_ << token::SPACE
90 << e.x_ << token::SPACE
91 << e.sigma_ << token::SPACE
92 << e.alpha_ << token::SPACE
93 << e.Rpg_ << token::SPACE
94 << e.c1_ << token::SPACE
95 << e.dir1_;
96
98 return os;
99}
100
101
102// ************************************************************************* //
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition: IOstream.C:58
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Class to describe eddies for the turbulentDFSEMInletFvPatchVectorField boundary condition.
Definition: eddy.H:70
eddy()
Construct null.
Definition: eddy.C:117
void operator=(const eddy &e)
Definition: eddyIO.C:51
@ SPACE
Space [isspace].
Definition: token.H:125
OBJstream os(runTime.globalPath()/outputName)
#define FUNCTION_NAME
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
Definition: label.H:66
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Istream & operator>>(Istream &, directionInfo &)
volScalarField & e
Definition: createFields.H:11