1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Spatial transformation functions for primitive fields.
33 \*---------------------------------------------------------------------------*/
35 #ifndef transformField_H
36 #define transformField_H
38 #include "transform.H"
39 #include "quaternion.H"
40 #include "septernion.H"
41 #include "vectorField.H"
42 #include "tensorField.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 void transform(Field<Type>&, const tensorField&, const Field<Type>&);
55 tmp<Field<Type> > transform(const tensorField&, const Field<Type>&);
58 tmp<Field<Type> > transform(const tensorField&, const tmp<Field<Type> >&);
61 tmp<Field<Type> > transform(const tmp<tensorField>&, const Field<Type>&);
64 tmp<Field<Type> > transform(const tmp<tensorField>&, const tmp<Field<Type> >&);
68 void transform(Field<Type>&, const tensor&, const Field<Type>&);
71 tmp<Field<Type> > transform(const tensor&, const Field<Type>&);
74 tmp<Field<Type> > transform(const tensor&, const tmp<Field<Type> >&);
77 template<class Type1, class Type2>
78 tmp<Field<Type1> > transformFieldMask(const Field<Type2>&);
80 template<class Type1, class Type2>
81 tmp<Field<Type1> > transformFieldMask(const tmp<Field<Type2> >&);
85 tmp<Field<symmTensor> > transformFieldMask<symmTensor>
91 tmp<Field<symmTensor> > transformFieldMask<symmTensor>
93 const tmp<tensorField>&
98 tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
104 tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
106 const tmp<tensorField>&
110 //- Rotate given vectorField with the given quaternion
111 void transform(vectorField&, const quaternion&, const vectorField&);
113 //- Rotate given vectorField with the given quaternion
114 tmp<vectorField> transform(const quaternion&, const vectorField&);
116 //- Rotate given tmp<vectorField> with the given quaternion
117 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
120 //- Transform given vectorField with the given septernion
121 void transform(vectorField&, const septernion&, const vectorField&);
123 //- Transform given vectorField with the given septernion
124 tmp<vectorField> transform(const septernion&, const vectorField&);
126 //- Transform given tmp<vectorField> with the given septernion
127 tmp<vectorField> transform(const septernion&, const tmp<vectorField>&);
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 # include "transformFieldTemplates.C"
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 // ************************************************************************* //