transformField.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
27InNamespace
28 Foam
29
30Description
31 Spatial transformation functions for primitive fields.
32
33SourceFiles
34 transformField.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef transformField_H
39#define transformField_H
40
41#include "transform.H"
42#include "quaternion.H"
43#include "septernion.H"
44#include "vectorField.H"
45#include "tensorField.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54// transform()
55
56template<class Type>
57void transform
58(
59 Field<Type>& result,
60 const tensor& rot,
61 const Field<Type>& fld
62);
63
64template<class Type>
65void transform
66(
67 Field<Type>& result,
68 const tensorField& rot,
69 const Field<Type>& fld
70);
71
72
73template<class Type>
75(
76 const tensorField& rot,
77 const Field<Type>& fld
78);
79
80template<class Type>
82(
83 const tensorField& rot,
84 const tmp<Field<Type>>& tfld
85);
86
87template<class Type>
89(
90 const tmp<tensorField>& trot,
91 const Field<Type>& fld
92);
93
94template<class Type>
96(
97 const tmp<tensorField>& trot,
98 const tmp<Field<Type>>& tfld
99);
100
101
102template<class Type>
104(
105 const tensor& rot,
106 const Field<Type>& fld
107);
108
109template<class Type>
111(
112 const tensor& rot,
113 const tmp<Field<Type>>& tfld
114);
115
116
117// invTransform()
118
119template<class Type>
120void invTransform
121(
122 Field<Type>& result,
123 const tensor& rot,
124 const Field<Type>& fld
125);
126
127template<class Type>
128void invTransform
129(
130 Field<Type>& result,
131 const tensorField& rot,
132 const Field<Type>& fld
133);
134
135
136template<class Type>
138(
139 const tensorField& rot,
140 const Field<Type>& fld
141);
142
143template<class Type>
145(
146 const tensorField& rot,
147 const tmp<Field<Type>>& tfld
148);
149
150template<class Type>
152(
153 const tmp<tensorField>& trot,
154 const Field<Type>& fld
155);
156
157template<class Type>
159(
160 const tmp<tensorField>& trot,
161 const tmp<Field<Type>>& tfld
162);
163
164
165template<class Type>
167(
168 const tensor& rot,
169 const Field<Type>& fld
170);
171
172template<class Type>
174(
175 const tensor& rot,
176 const tmp<Field<Type>>& tfld
177);
178
179
180
181template<class Type1, class Type2>
183
184template<class Type1, class Type2>
186
187
188// Specializations
189
190template<>
193
194template<>
197
198template<>
201
202template<>
205
206
207//- Rotate given vectorField with the given quaternion
208void transform(vectorField&, const quaternion&, const vectorField&);
209
210//- Rotate given vectorField with the given quaternion
212
213//- Rotate given tmp<vectorField> with the given quaternion
215
216
217//- Transform given vectorField of coordinates with the given septernion
219
220//- Transform given vectorField of coordinates with the given septernion
222
223//- Transform given tmp<vectorField> of coordinates with the given septernion
225
226
227// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
228
229} // End namespace Foam
230
231// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232
233#ifdef NoRepository
235#endif
236
237// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238
239#endif
240
241// ************************************************************************* //
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Quaternion class used to perform rotations in 3D space.
Definition: quaternion.H:58
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:67
Tensor of scalars, i.e. Tensor<scalar>.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Definition: dimensionSet.C:542
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Definition: dimensionSet.C:536
tmp< Field< sphericalTensor > > transformFieldMask< sphericalTensor >(const tensorField &tf)
tmp< Field< Type1 > > transformFieldMask(const Field< Type2 > &fld)
tmp< Field< symmTensor > > transformFieldMask< symmTensor >(const tensorField &tf)
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
void transformPoints(vectorField &, const septernion &, const vectorField &)
Transform given vectorField of coordinates with the given septernion.
3D tensor transformation operations.