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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 InClass
25  Foam
26 
27 Description
28  Spatial transformation functions for primitive fields.
29 
30 SourceFiles
31  transformList.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef transformList_H
36 #define transformList_H
37 
38 #include "transform.H"
39 #include "List.H"
40 #include "Map.H"
41 #include "EdgeMap.H"
42 #include "tensorField.H"
43 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 //- Extend transform to work on list.
53 template<class T>
54 List<T> transform
55 (
56  const tensor& rotTensor,
57  const UList<T>& field
58 );
59 
60 //- Apply transformation to list. Either single transformation tensor
61 // or one tensor per element.
62 template<class T>
63 void transformList(const tensor&, UList<T>&);
64 template<class T>
65 void transformList(const tensorField&, UList<T>&);
66 
67 template<class T>
68 void transformList(const tensor&, Map<T>&);
69 template<class T>
70 void transformList(const tensorField&, Map<T>&);
71 
72 template<class T>
73 void transformList(const tensor&, EdgeMap<T>&);
74 template<class T>
75 void transformList(const tensorField&, EdgeMap<T>&);
76 
77 
78 // Specialisations for bool
79 template<>
80 inline void transformList(const tensor&, UList<bool>&)
81 {}
82 template<>
83 inline void transformList(const tensorField&, UList<bool>&)
84 {}
85 template<>
86 inline void transformList(const tensor&, Map<bool>&)
87 {}
88 template<>
89 inline void transformList(const tensorField&, Map<bool>&)
90 {}
91 template<>
92 inline void transformList(const tensor&, EdgeMap<bool>&)
93 {}
94 template<>
96 {}
97 
98 
99 // Specialisations for label
100 template<>
101 inline void transformList(const tensor&, labelUList&)
102 {}
103 template<>
104 inline void transformList(const tensorField&, labelUList&)
105 {}
106 template<>
107 inline void transformList(const tensor&, Map<label>&)
108 {}
109 template<>
110 inline void transformList(const tensorField&, Map<label>&)
111 {}
112 template<>
113 inline void transformList(const tensor&, EdgeMap<label>&)
114 {}
115 template<>
117 {}
118 
119 
120 // Specialisations for scalar
121 template<>
122 inline void transformList(const tensor&, UList<scalar>&)
123 {}
124 template<>
126 {}
127 template<>
128 inline void transformList(const tensor&, Map<scalar>&)
129 {}
130 template<>
131 inline void transformList(const tensorField&, Map<scalar>&)
132 {}
133 template<>
134 inline void transformList(const tensor&, EdgeMap<scalar>&)
135 {}
136 template<>
138 {}
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #ifdef NoRepository
148  #include "transformList.C"
149 #endif
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
void transformList(const tensor &, UList< T > &)
Apply transformation to list. Either single transformation tensor.
Definition: transformList.C:49
Pre-declare SubField and related Field type.
Definition: Field.H:57
3D tensor transformation operations.
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:60
Map from edge (expressed as its endpoints) to value.
Definition: EdgeMap.H:47
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
Templated 3D tensor derived from MatrixSpace adding construction from 9 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators.
Definition: complexI.H:222
Tensor< scalar > tensor
Tensor of scalars.
Definition: tensor.H:51
Namespace for OpenFOAM.
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:465
A HashTable to objects of type <T> with a label key.
Definition: Map.H:49