tetIndices.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 "tetIndices.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 int Foam::tetIndices::nWarnings_ = 0;
34 
35 
36 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
37 
39 {
40  is >> rhs.cell() >> rhs.face() >> rhs.tetPt();
41 
42  is.check(FUNCTION_NAME);
43  return is;
44 }
45 
46 
47 Foam::Ostream& Foam::operator<<(Ostream& os, const tetIndices& rhs)
48 {
49  os << rhs.cell() << token::SPACE
50  << rhs.face() << token::SPACE
51  << rhs.tetPt() << nl;
52 
53  os.check(FUNCTION_NAME);
54  return os;
55 }
56 
57 
58 // ************************************************************************* //
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition: IOstream.C:45
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
label cell() const noexcept
Return the cell index.
Definition: tetIndices.H:146
Istream & operator>>(Istream &, directionInfo &)
label tetPt() const noexcept
Return the characterising tet point index.
Definition: tetIndices.H:166
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
Definition: tetIndices.H:78
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)
#define FUNCTION_NAME
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
label face() const noexcept
Return the face index.
Definition: tetIndices.H:156