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 | Copyright (C) 2011-2017 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 "tetIndices.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 const Foam::label Foam::tetIndices::maxNWarnings = 100;
31 
32 Foam::label Foam::tetIndices::nWarnings = 0;
33 
34 
35 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
36 
38 :
39  celli_(-1),
40  facei_(-1),
41  tetPti_(-1)
42 {}
43 
44 
46 (
47  label celli,
48  label facei,
49  label tetPtI
50 )
51 :
52  celli_(celli),
53  facei_(facei),
54  tetPti_(tetPtI)
55 {}
56 
57 
58 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
59 
61 {}
62 
63 
64 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
65 
67 {
68  is >> tI.cell() >> tI.face() >> tI.tetPt();
69 
70  // Check state of Istream
71  is.check
72  (
73  "Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::tetIndices&)"
74  );
75 
76  return is;
77 }
78 
79 
81 {
82  os << tI.cell() << token::SPACE
83  << tI.face() << token::SPACE
84  << tI.tetPt() << token::SPACE
85  << endl;
86 
87  // Check state of Ostream
88  os.check
89  (
90  "Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
91  "const Foam::tetIndices&)"
92  );
93 
94  return os;
95 }
96 
97 
98 // ************************************************************************* //
label tetPt() const
Return the characterising tetPtI.
Definition: tetIndicesI.H:52
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition: IOstream.C:92
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
~tetIndices()
Destructor.
Definition: tetIndices.C:60
label cell() const
Return the cell.
Definition: tetIndicesI.H:28
Istream & operator>>(Istream &, directionInfo &)
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
Definition: tetIndices.H:81
label face() const
Return the face.
Definition: tetIndicesI.H:40
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
Ostream & operator<<(Ostream &, const ensightPart &)
tetIndices()
Construct null.
Definition: tetIndices.C:37