1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Spatial transformation functions for primitive fields.
34 \*---------------------------------------------------------------------------*/
36 #ifndef transformField_H
37 #define transformField_H
39 #include "transform.H"
40 #include "quaternion.H"
41 #include "septernion.H"
42 #include "vectorField.H"
43 #include "tensorField.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 void transform(Field<Type>&, const tensorField&, const Field<Type>&);
56 tmp<Field<Type> > transform(const tensorField&, const Field<Type>&);
59 tmp<Field<Type> > transform(const tensorField&, const tmp<Field<Type> >&);
62 tmp<Field<Type> > transform(const tmp<tensorField>&, const Field<Type>&);
65 tmp<Field<Type> > transform(const tmp<tensorField>&, const tmp<Field<Type> >&);
69 void transform(Field<Type>&, const tensor&, const Field<Type>&);
72 tmp<Field<Type> > transform(const tensor&, const Field<Type>&);
75 tmp<Field<Type> > transform(const tensor&, const tmp<Field<Type> >&);
78 template<class Type1, class Type2>
79 tmp<Field<Type1> > transformFieldMask(const Field<Type2>&);
81 template<class Type1, class Type2>
82 tmp<Field<Type1> > transformFieldMask(const tmp<Field<Type2> >&);
86 tmp<Field<symmTensor> > transformFieldMask<symmTensor>
92 tmp<Field<symmTensor> > transformFieldMask<symmTensor>
94 const tmp<tensorField>&
99 tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
105 tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
107 const tmp<tensorField>&
111 //- Rotate given vectorField with the given quaternion
112 void transform(vectorField&, const quaternion&, const vectorField&);
114 //- Rotate given vectorField with the given quaternion
115 tmp<vectorField> transform(const quaternion&, const vectorField&);
117 //- Rotate given tmp<vectorField> with the given quaternion
118 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
121 //- Transform given vectorField with the given septernion
122 void transform(vectorField&, const septernion&, const vectorField&);
124 //- Transform given vectorField with the given septernion
125 tmp<vectorField> transform(const septernion&, const vectorField&);
127 //- Transform given tmp<vectorField> with the given septernion
128 tmp<vectorField> transform(const septernion&, const tmp<vectorField>&);
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 # include "transformFieldTemplates.C"
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //