Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31inline Foam::cell::cell(const label sz)
32:
33 labelList(sz, -1)
34{}
35
36
37inline Foam::cell::cell(const labelUList& list)
38:
39 labelList(list)
40{}
41
42
43template<unsigned N>
44inline Foam::cell::cell(const FixedList<label, N>& list)
45:
46 labelList(list)
47{}
48
50inline Foam::cell::cell(labelList&& list)
51:
52 labelList(std::move(list))
53{}
54
55
56inline Foam::cell::cell(const labelUList& list, const labelUList& indices)
57:
58 labelList(list, indices)
59{}
60
61
62template<unsigned N>
64(
65 const labelUList& list,
66 const FixedList<label, N>& indices
67)
68:
69 labelList(list, indices)
70{}
71
72
73inline Foam::cell::cell(Istream& is)
75 labelList(is)
76{}
77
78
79// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
80
81inline Foam::label Foam::cell::nFaces() const noexcept
83 return size();
84}
85
86
87// * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * * //
88
89inline bool Foam::operator!=(const cell& a, const cell& b)
90{
91 return !(a == b);
92}
93
94
95// ************************************************************************* //
A 1D vector of objects of type <T> with a fixed length <N>.
Definition FixedList.H:73
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
void size(const label n)
Definition UList.H:118
A cell is defined as a list of faces with extra functionality.
Definition cell.H:56
constexpr cell() noexcept=default
Default construct.
label nFaces() const noexcept
Return number of faces.
Definition cellI.H:74
bool operator!=(const eddy &a, const eddy &b)
Definition eddy.H:297
List< label > labelList
A List of labels.
Definition List.H:62
const direction noexcept
Definition scalarImpl.H:265
UList< label > labelUList
A UList of labels.
Definition UList.H:75
volScalarField & b