All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2020 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 "quaternion.H"
40 #include "septernion.H"
41 #include "vectorField.H"
42 #include "tensorField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 template<class Type>
52 List<Type> transform(const tensor&, const UList<Type>&);
53 
54 
55 template<class Type>
56 void transform(Field<Type>&, const tensorField&, const Field<Type>&);
57 
58 template<class Type>
59 tmp<Field<Type>> transform(const tensorField&, const Field<Type>&);
60 
61 template<class Type>
62 tmp<Field<Type>> transform(const tensorField&, const tmp<Field<Type>>&);
63 
64 template<class Type>
65 tmp<Field<Type>> transform(const tmp<tensorField>&, const Field<Type>&);
66 
67 template<class Type>
68 tmp<Field<Type>> transform(const tmp<tensorField>&, const tmp<Field<Type>>&);
69 
70 
71 template<class Type>
72 void transform(Field<Type>&, const tensor&, const Field<Type>&);
73 
74 template<class Type>
75 tmp<Field<Type>> transform(const tensor&, const Field<Type>&);
76 
77 template<class Type>
78 tmp<Field<Type>> transform(const tensor&, const tmp<Field<Type>>&);
79 
80 
81 template<class Type1, class Type2>
82 tmp<Field<Type1>> transformFieldMask(const Field<Type2>&);
83 
84 template<class Type1, class Type2>
85 tmp<Field<Type1>> transformFieldMask(const tmp<Field<Type2>>&);
86 
87 
88 template<>
89 tmp<Field<symmTensor>> transformFieldMask<symmTensor>
90 (
91  const tensorField&
92 );
93 
94 template<>
95 tmp<Field<symmTensor>> transformFieldMask<symmTensor>
96 (
97  const tmp<tensorField>&
98 );
99 
100 
101 template<>
102 tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
103 (
104  const tensorField&
105 );
106 
107 template<>
108 tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
109 (
110  const tmp<tensorField>&
111 );
112 
113 
114 //- Rotate given vectorField with the given quaternion
115 void transform(vectorField&, const quaternion&, const vectorField&);
116 
117 //- Rotate given vectorField with the given quaternion
118 tmp<vectorField> transform(const quaternion&, const vectorField&);
119 
120 //- Rotate given tmp<vectorField> with the given quaternion
121 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
122 
123 
124 //- Transform given vectorField of coordinates with the given septernion
125 void transformPoints(vectorField&, const septernion&, const vectorField&);
126 
127 //- Transform given vectorField of coordinates with the given septernion
128 tmp<vectorField> transformPoints(const septernion&, const vectorField&);
129 
130 //- Transform given tmp<vectorField> of coordinates with the given septernion
131 tmp<vectorField> transformPoints(const septernion&, const tmp<vectorField>&);
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #ifdef NoRepository
141  #include "transformFieldTemplates.C"
142 #endif
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
void transformPoints(vectorField &, const septernion &, const vectorField &)
Transform given vectorField of coordinates with the given septernion.
tmp< Field< sphericalTensor > > transformFieldMask< sphericalTensor >(const tensorField &tf)
3D tensor transformation operations.
tmp< Field< Type1 > > transformFieldMask(const Field< Type2 > &)
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
Field< vector > vectorField
Specialisation of Field<T> for vector.
tmp< Field< symmTensor > > transformFieldMask< symmTensor >(const tensorField &tf)
Tensor< scalar > tensor
Tensor of scalars.
Definition: tensor.H:51
Namespace for OpenFOAM.
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:477