cellI.H
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 OpenFOAM Foundation
9  Copyright (C) 2020 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 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 
31 inline Foam::cell::cell(const label sz)
32 :
33  labelList(sz, -1)
34 {}
35 
36 
37 inline Foam::cell::cell(const labelUList& list)
38 :
39  labelList(list)
40 {}
41 
42 
43 template<unsigned N>
45 :
46  labelList(list)
47 {}
48 
49 
51 :
52  labelList(std::move(list))
53 {}
54 
55 
56 inline Foam::cell::cell(const labelUList& list, const labelUList& indices)
57 :
58  labelList(list, indices)
59 {}
60 
61 
62 template<unsigned N>
63 inline Foam::cell::cell
64 (
65  const labelUList& list,
66  const FixedList<label, N>& indices
67 )
68 :
69  labelList(list, indices)
70 {}
71 
72 
74 :
75  labelList(is)
76 {}
77 
78 
79 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
80 
81 inline Foam::label Foam::cell::nFaces() const noexcept
82 {
83  return size();
84 }
85 
86 
87 // * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * * //
88 
89 inline bool Foam::operator!=(const cell& a, const cell& b)
90 {
91  return !(a == b);
92 }
93 
94 
95 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::cell::cell
constexpr cell() noexcept=default
Default construct.
Foam::operator!=
bool operator!=(const eddy &a, const eddy &b)
Definition: eddy.H:239
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::cell::nFaces
label nFaces() const noexcept
Return number of faces.
Definition: cellI.H:81
Foam::List< label >
Foam::FixedList
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: HashTable.H:104
Foam::UList< label >
Foam::cell
A cell is defined as a list of faces with extra functionality.
Definition: cell.H:54