transformField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 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 InNamespace
25  Foam
26 
27 Description
28  Spatial transformation functions for primitive fields.
29 
30 SourceFiles
31  transformField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef transformField_H
36 #define transformField_H
37 
38 #include "transform.H"
39 #include "spatialTransform.H"
40 #include "quaternion.H"
41 #include "septernion.H"
42 #include "vectorField.H"
43 #include "tensorField.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 template<class Type>
53 List<Type> transform(const tensor&, const UList<Type>&);
54 
55 
56 template<class Type>
57 void transform(Field<Type>&, const tensorField&, const Field<Type>&);
58 
59 template<class Type>
60 tmp<Field<Type>> transform(const tensorField&, const Field<Type>&);
61 
62 template<class Type>
63 tmp<Field<Type>> transform(const tensorField&, const tmp<Field<Type>>&);
64 
65 template<class Type>
66 tmp<Field<Type>> transform(const tmp<tensorField>&, const Field<Type>&);
67 
68 template<class Type>
69 tmp<Field<Type>> transform(const tmp<tensorField>&, const tmp<Field<Type>>&);
70 
71 
72 template<class Type>
73 void transform(Field<Type>&, const tensor&, const Field<Type>&);
74 
75 template<class Type>
76 tmp<Field<Type>> transform(const tensor&, const Field<Type>&);
77 
78 template<class Type>
79 tmp<Field<Type>> transform(const tensor&, const tmp<Field<Type>>&);
80 
81 
82 template<class Type1, class Type2>
83 tmp<Field<Type1>> transformFieldMask(const Field<Type2>&);
84 
85 template<class Type1, class Type2>
86 tmp<Field<Type1>> transformFieldMask(const tmp<Field<Type2>>&);
87 
88 
89 template<>
90 tmp<Field<symmTensor>> transformFieldMask<symmTensor>
91 (
92  const tensorField&
93 );
94 
95 template<>
96 tmp<Field<symmTensor>> transformFieldMask<symmTensor>
97 (
98  const tmp<tensorField>&
99 );
100 
101 
102 template<>
103 tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
104 (
105  const tensorField&
106 );
107 
108 template<>
109 tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
110 (
111  const tmp<tensorField>&
112 );
113 
114 
115 //- Transform given vectorField of coordinates with the given spatialTransform
116 void transformPoints(vectorField&, const spatialTransform&, const vectorField&);
117 
118 //- Transform given vectorField of coordinates with the given spatialTransform
119 tmp<vectorField> transformPoints(const spatialTransform&, const vectorField&);
120 
121 //- Transform given tmp<vectorField> of coordinates
122 // with the given spatialTransform
123 tmp<vectorField> transformPoints
124 (
125  const spatialTransform&,
126  const tmp<vectorField>&
127 );
128 
129 
130 //- Rotate given vectorField with the given quaternion
131 void transform(vectorField&, const quaternion&, const vectorField&);
132 
133 //- Rotate given vectorField with the given quaternion
134 tmp<vectorField> transform(const quaternion&, const vectorField&);
135 
136 //- Rotate given tmp<vectorField> with the given quaternion
137 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
138 
139 
140 //- Transform given vectorField of coordinates with the given septernion
141 void transformPoints(vectorField&, const septernion&, const vectorField&);
142 
143 //- Transform given vectorField of coordinates with the given septernion
144 tmp<vectorField> transformPoints(const septernion&, const vectorField&);
145 
146 //- Transform given tmp<vectorField> of coordinates with the given septernion
147 tmp<vectorField> transformPoints(const septernion&, const tmp<vectorField>&);
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #ifdef NoRepository
157  #include "transformFieldTemplates.C"
158 #endif
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
Namespace for OpenFOAM.
void transformPoints(vectorField &, const spatialTransform &, const vectorField &)
Transform given vectorField of coordinates with the given spatialTransform.
tmp< Field< sphericalTensor > > transformFieldMask< sphericalTensor >(const tensorField &tf)
Tensor< scalar > tensor
Tensor of scalars.
Definition: tensor.H:51
tmp< Field< Type1 > > transformFieldMask(const Field< Type2 > &)
tmp< Field< symmTensor > > transformFieldMask< symmTensor >(const tensorField &tf)
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:483
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
3D tensor transformation operations.