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  // Copy addressing
67  IndirectListAddressing<labelList>(list.addressing()),
69  (
70  list.values(),
71  IndirectListAddressing<labelList>::addressing()
72  )
73 {}
74 
75 
76 template<class T>
78 :
79  // Move addressing
80  IndirectListAddressing<labelList>(std::move(list.addressing())),
82  (
83  list.values(),
84  IndirectListAddressing<labelList>::addressing()
85  )
86 {}
87 
88 
89 template<class T>
91 :
92  // Copy addressing
93  IndirectListAddressing<labelList>(list.addressing()),
95  (
96  list.values(),
97  IndirectListAddressing<labelList>::addressing()
98  )
99 {}
100 
101 
102 // ************************************************************************* //
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: fvMatrix.H:109
Foam::IndirectList::IndirectList
IndirectList(const UList< T > &values, const labelUList &addr)
Copy construct addressing, shallow copy values list reference.
Definition: IndirectListI.H:33