SliceList.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) 2019 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::SliceList
28 
29 Description
30  A List with indirect slice addressing.
31 
32 SourceFiles
33  SliceList.H
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef SliceList_H
38 #define SliceList_H
39 
40 #include "IndirectListAddressing.H"
41 #include "IndirectListBase.H"
42 #include "sliceRange.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class SliceList Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class T>
54 class SliceList
55 :
56  private IndirectListAddressing<sliceRange>,
57  public IndirectListBase<T, sliceRange>
58 {
59 public:
60 
61  // Constructors
62 
63  //- Copy construct from values list and slicing
64  SliceList(const UList<T>& values, const sliceRange& addr)
65  :
68  (
69  values,
71  )
72  {}
73 
74 
75  // Member Functions
76 
77  //- The list addressing
79 
80 
81  // Member Operators
82 
83  //- Use standard assignment operations
85 
86 };
87 
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 } // End namespace Foam
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #endif
96 
97 // ************************************************************************* //
Foam::IndirectListAddressing< sliceRange >::addressing
const sliceRange & addressing() const
Const access to the addressing.
Definition: IndirectListAddressing.H:80
sliceRange.H
Foam::IndirectListAddressing
A class for storing list addressing (labels, slices etc) which are normally to used by IndirectList....
Definition: IndirectListAddressing.H:52
Foam::IndirectListBase< T, sliceRange >::values
const UList< T > & values() const
The list of values (without addressing)
Definition: IndirectListBase.H:165
IndirectListBase.H
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::SliceList::SliceList
SliceList(const UList< T > &values, const sliceRange &addr)
Copy construct from values list and slicing.
Definition: SliceList.H:63
Foam::SliceList
A List with indirect slice addressing.
Definition: SliceList.H:53
IndirectListAddressing.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::sliceRange
A set of labels defined by a start, a length and a stride.
Definition: sliceRange.H:56
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::IndirectListBase
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
Definition: IndirectListBase.H:57