IndirectListI.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-2016 OpenFOAM Foundation
9  Copyright (C) 2019-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 template<class T>
33 (
34  const UList<T>& values,
35  const labelUList& addr
36 )
37 :
40  (
41  values,
43  )
44 {}
45 
46 
47 template<class T>
49 (
50  const UList<T>& values,
51  labelList&& addr
52 )
53 :
54  IndirectListAddressing<labelList>(std::move(addr)),
56  (
57  values,
59  )
60 {}
61 
62 
63 template<class T>
65 (
66  const UList<T>& values,
67  const Foam::zero
68 )
69 :
70  IndirectListAddressing<labelList>(labelList()), // zero-size addressing
72  (
73  values,
75  )
76 {}
77 
78 
79 template<class T>
81 :
82  // Copy addressing
83  IndirectListAddressing<labelList>(list.addressing()),
85  (
86  list.values(),
87  IndirectListAddressing<labelList>::addressing()
88  )
89 {}
90 
91 
92 template<class T>
94 :
95  // Move addressing
96  IndirectListAddressing<labelList>(std::move(list.addressing())),
98  (
99  list.values(),
100  IndirectListAddressing<labelList>::addressing()
101  )
102 {}
103 
104 
105 template<class T>
107 :
108  // Copy addressing
109  IndirectListAddressing<labelList>(list.addressing()),
111  (
112  list.values(),
113  IndirectListAddressing<labelList>::addressing()
114  )
115 {}
116 
117 
118 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::IndirectListAddressing< labelList >
Foam::HashTableOps::values
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Definition: HashOps.H:149
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::IndirectList
A List with indirect addressing.
Definition: IndirectList.H:56
T
const volScalarField & T
Definition: createFieldRefs.H:2
Foam::List< label >
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:103
Foam::UIndirectList
A List with indirect addressing.
Definition: faMatrix.H:60
Foam::IndirectList::IndirectList
IndirectList(const UList< T > &values, const labelUList &addr)
Copy construct addressing, shallow copy values reference.
Definition: IndirectListI.H:33
Foam::zero
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:62