OpenFOAM: API Guide
v2112
The open source CFD toolbox
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>
32
inline
Foam::IndirectList<T>::IndirectList
33
(
34
const
UList<T>
&
values
,
35
const
labelUList
& addr
36
)
37
:
38
IndirectListAddressing<labelList>
(addr),
39
UIndirectList<T>
40
(
41
values
,
42
IndirectListAddressing<labelList>::addressing
()
43
)
44
{}
45
46
47
template
<
class
T>
48
inline
Foam::IndirectList<T>::IndirectList
49
(
50
const
UList<T>
&
values
,
51
labelList
&& addr
52
)
53
:
54
IndirectListAddressing<labelList>
(std::move(addr)),
55
UIndirectList<T>
56
(
57
values
,
58
IndirectListAddressing<labelList>::addressing
()
59
)
60
{}
61
62
63
template
<
class
T>
64
inline
Foam::IndirectList<T>::IndirectList
65
(
66
const
UList<T>
&
values
,
67
const
Foam::zero
68
)
69
:
70
IndirectListAddressing<labelList>
(
labelList
()),
// zero-size addressing
71
UIndirectList<T>
72
(
73
values
,
74
IndirectListAddressing<labelList>::addressing
()
75
)
76
{}
77
78
79
template
<
class
T>
80
inline
Foam::IndirectList<T>::IndirectList
(
const
IndirectList<T>
& list)
81
:
82
// Copy addressing
83
IndirectListAddressing
<
labelList
>(list.addressing()),
84
UIndirectList
<
T
>
85
(
86
list.
values
(),
87
IndirectListAddressing
<
labelList
>::addressing()
88
)
89
{}
90
91
92
template
<
class
T>
93
inline
Foam::IndirectList<T>::IndirectList
(
IndirectList<T>
&& list)
94
:
95
// Move addressing
96
IndirectListAddressing
<
labelList
>(std::move(list.addressing())),
97
UIndirectList
<
T
>
98
(
99
list.
values
(),
100
IndirectListAddressing
<
labelList
>::addressing()
101
)
102
{}
103
104
105
template
<
class
T>
106
inline
Foam::IndirectList<T>::IndirectList
(
const
UIndirectList<T>
& list)
107
:
108
// Copy addressing
109
IndirectListAddressing
<
labelList
>(list.addressing()),
110
UIndirectList
<
T
>
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
src
OpenFOAM
containers
IndirectLists
IndirectList
IndirectListI.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.