transformList.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) 2018 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
27InClass
28 Foam
29
30Description
31 Spatial transformation functions for list of values and primitive fields.
32
33SourceFiles
34 transformList.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef transformList_H
39#define transformList_H
40
41#include "transform.H"
42#include "List.H"
43#include "Map.H"
44#include "edgeHashes.H"
45#include "tensorField.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54//- Apply transform to a list of elements, returning a copy.
55template<class T>
56List<T> transform(const tensor& rotTensor, const UList<T>& field);
57
58//- Inplace transform a list of elements.
59template<class T>
60void transformList(const tensor& rotTensor, UList<T>& field);
61
62//- Inplace transform a list of elements using one tensor per element.
63template<class T>
64void transformList(const tensorField& rotTensor, UList<T>& field);
65
66//- Inplace transform a Map of elements.
67template<class T>
68void transformList(const tensor& rotTensor, Map<T>& field);
69
70//- Inplace transform a Map of elements using one tensor per element.
71// Using multiple tensors is ill-defined (Fatal).
72template<class T>
73void transformList(const tensorField& rotTensor, Map<T>& field);
74
75//- Inplace transform a Map of elements.
76// Using multiple tensors is ill-defined (Fatal).
77template<class T>
78void transformList(const tensor& rotTensor, EdgeMap<T>& field);
79
80//- Inplace transform a Map of elements using one tensor per element.
81// Using multiple tensors is ill-defined (Fatal).
82template<class T>
83void transformList(const tensorField& rotTensor, EdgeMap<T>& field);
84
85
86// Specialisations for bool (no-op)
87template<> inline void transformList(const tensor&, UList<bool>&) {}
88template<> inline void transformList(const tensorField&, UList<bool>&) {}
89template<> inline void transformList(const tensor&, Map<bool>&) {}
90template<> inline void transformList(const tensorField&, Map<bool>&) {}
91template<> inline void transformList(const tensor&, EdgeMap<bool>&) {}
92template<> inline void transformList(const tensorField&, EdgeMap<bool>&) {}
93
94
95// Specialisations for label (no-op)
96template<> inline void transformList(const tensor&, labelUList&) {}
97template<> inline void transformList(const tensorField&, labelUList&) {}
98template<> inline void transformList(const tensor&, Map<label>&) {}
99template<> inline void transformList(const tensorField&, Map<label>&) {}
100template<> inline void transformList(const tensor&, EdgeMap<label>&) {}
101template<> inline void transformList(const tensorField&, EdgeMap<label>&) {}
102
103
104// Specialisations for scalar (no-op)
105template<> inline void transformList(const tensor&, UList<scalar>&) {}
106template<> inline void transformList(const tensorField&, UList<scalar>&) {}
107template<> inline void transformList(const tensor&, Map<scalar>&) {}
108template<> inline void transformList(const tensorField&, Map<scalar>&) {}
109template<> inline void transformList(const tensor&, EdgeMap<scalar>&) {}
110template<> inline void transformList(const tensorField&, EdgeMap<scalar>&) {}
111
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115} // End namespace Foam
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119#ifdef NoRepository
120 #include "transformList.C"
121#endif
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125#endif
126
127// ************************************************************************* //
Map from edge (expressed as its endpoints) to value. For easier forward declaration it is currently i...
Definition: EdgeMap.H:54
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A HashTable to objects of type <T> with a label key.
Definition: Map.H:60
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
rDeltaTY field()
Namespace for OpenFOAM.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Definition: dimensionSet.C:536
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
Definition: transformList.C:52
3D tensor transformation operations.