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/>.
25 Spatial transformation functions for FieldFields.
27 \*---------------------------------------------------------------------------*/
29 #include "transformGeometricField.H"
30 #include "transformField.H"
31 #include "transformFieldField.H"
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 // * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * //
40 template<class Type, template<class> class PatchField, class GeoMesh>
43 GeometricField<Type, PatchField, GeoMesh>& rtf,
44 const GeometricField<tensor, PatchField, GeoMesh>& trf,
45 const GeometricField<Type, PatchField, GeoMesh>& tf
48 transform(rtf.internalField(), trf.internalField(), tf.internalField());
49 transform(rtf.boundaryField(), trf.boundaryField(), tf.boundaryField());
53 template<class Type, template<class> class PatchField, class GeoMesh>
54 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
56 const GeometricField<tensor, PatchField, GeoMesh>& trf,
57 const GeometricField<Type, PatchField, GeoMesh>& tf
60 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf
62 new GeometricField<Type, PatchField, GeoMesh>
66 "transform(" + trf.name() + ',' + tf.name() + ')',
77 transform(tranf(), trf, tf);
83 template<class Type, template<class> class PatchField, class GeoMesh>
84 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
86 const GeometricField<tensor, PatchField, GeoMesh>& trf,
87 const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
90 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
91 transform(trf, ttf());
97 template<class Type, template<class> class PatchField, class GeoMesh>
98 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
100 const tmp<GeometricField<tensor, PatchField, GeoMesh> >& ttrf,
101 const GeometricField<Type, PatchField, GeoMesh>& tf
104 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
105 transform(ttrf(), tf);
111 template<class Type, template<class> class PatchField, class GeoMesh>
112 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
114 const tmp<GeometricField<tensor, PatchField, GeoMesh> >& ttrf,
115 const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
118 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
119 transform(ttrf(), ttf());
126 template<class Type, template<class> class PatchField, class GeoMesh>
129 GeometricField<Type, PatchField, GeoMesh>& rtf,
130 const dimensionedTensor& t,
131 const GeometricField<Type, PatchField, GeoMesh>& tf
134 transform(rtf.internalField(), t.value(), tf.internalField());
135 transform(rtf.boundaryField(), t.value(), tf.boundaryField());
139 template<class Type, template<class> class PatchField, class GeoMesh>
140 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
142 const dimensionedTensor& t,
143 const GeometricField<Type, PatchField, GeoMesh>& tf
146 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf
148 new GeometricField<vector, PatchField, GeoMesh>
152 "transform(" + t.name() + ',' + tf.name() + ')',
163 transform(tranf(), t, tf);
169 template<class Type, template<class> class PatchField, class GeoMesh>
170 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
172 const dimensionedTensor& t,
173 const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
176 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // ************************************************************************* //