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-2018 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 void transform(Field<Type>&, const tensorField&, const Field<Type>&);
53 
54 template<class Type>
55 tmp<Field<Type>> transform(const tensorField&, const Field<Type>&);
56 
57 template<class Type>
58 tmp<Field<Type>> transform(const tensorField&, const tmp<Field<Type>>&);
59 
60 template<class Type>
61 tmp<Field<Type>> transform(const tmp<tensorField>&, const Field<Type>&);
62 
63 template<class Type>
64 tmp<Field<Type>> transform(const tmp<tensorField>&, const tmp<Field<Type>>&);
65 
66 
67 template<class Type>
68 void transform(Field<Type>&, const tensor&, const Field<Type>&);
69 
70 template<class Type>
71 tmp<Field<Type>> transform(const tensor&, const Field<Type>&);
72 
73 template<class Type>
74 tmp<Field<Type>> transform(const tensor&, const tmp<Field<Type>>&);
75 
76 
77 template<class Type1, class Type2>
78 tmp<Field<Type1>> transformFieldMask(const Field<Type2>&);
79 
80 template<class Type1, class Type2>
81 tmp<Field<Type1>> transformFieldMask(const tmp<Field<Type2>>&);
82 
83 
84 template<>
85 tmp<Field<symmTensor>> transformFieldMask<symmTensor>
86 (
87  const tensorField&
88 );
89 
90 template<>
91 tmp<Field<symmTensor>> transformFieldMask<symmTensor>
92 (
93  const tmp<tensorField>&
94 );
95 
96 
97 template<>
98 tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
99 (
100  const tensorField&
101 );
102 
103 template<>
104 tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
105 (
106  const tmp<tensorField>&
107 );
108 
109 
110 //- Rotate given vectorField with the given quaternion
111 void transform(vectorField&, const quaternion&, const vectorField&);
112 
113 //- Rotate given vectorField with the given quaternion
114 tmp<vectorField> transform(const quaternion&, const vectorField&);
115 
116 //- Rotate given tmp<vectorField> with the given quaternion
117 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
118 
119 
120 //- Transform given vectorField of coordinates with the given septernion
121 void transformPoints(vectorField&, const septernion&, const vectorField&);
122 
123 //- Transform given vectorField of coordinates with the given septernion
124 tmp<vectorField> transformPoints(const septernion&, const vectorField&);
125 
126 //- Transform given tmp<vectorField> of coordinates with the given septernion
127 tmp<vectorField> transformPoints(const septernion&, const tmp<vectorField>&);
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #ifdef NoRepository
137  #include "transformFieldTemplates.C"
138 #endif
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
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