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
26 Spatial transformation functions for FieldFields.
28 \*---------------------------------------------------------------------------*/
30 #include "transformGeometricField.H"
31 #include <OpenFOAM/transformField.H>
32 #include <OpenFOAM/transformFieldField.H>
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 // * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * //
41 template<class Type, template<class> class PatchField, class GeoMesh>
44 GeometricField<Type, PatchField, GeoMesh>& rtf,
45 const GeometricField<tensor, PatchField, GeoMesh>& trf,
46 const GeometricField<Type, PatchField, GeoMesh>& tf
49 transform(rtf.internalField(), trf.internalField(), tf.internalField());
50 transform(rtf.boundaryField(), trf.boundaryField(), tf.boundaryField());
54 template<class Type, template<class> class PatchField, class GeoMesh>
55 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
57 const GeometricField<tensor, PatchField, GeoMesh>& trf,
58 const GeometricField<Type, PatchField, GeoMesh>& tf
61 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf
63 new GeometricField<Type, PatchField, GeoMesh>
67 "transform(" + trf.name() + ',' + tf.name() + ')',
78 transform(tranf(), trf, tf);
84 template<class Type, template<class> class PatchField, class GeoMesh>
85 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
87 const GeometricField<tensor, PatchField, GeoMesh>& trf,
88 const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
91 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
92 transform(trf, ttf());
98 template<class Type, template<class> class PatchField, class GeoMesh>
99 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
101 const tmp<GeometricField<tensor, PatchField, GeoMesh> >& ttrf,
102 const GeometricField<Type, PatchField, GeoMesh>& tf
105 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
106 transform(ttrf(), tf);
112 template<class Type, template<class> class PatchField, class GeoMesh>
113 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
115 const tmp<GeometricField<tensor, PatchField, GeoMesh> >& ttrf,
116 const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
119 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
120 transform(ttrf(), ttf());
127 template<class Type, template<class> class PatchField, class GeoMesh>
130 GeometricField<Type, PatchField, GeoMesh>& rtf,
131 const dimensionedTensor& t,
132 const GeometricField<Type, PatchField, GeoMesh>& tf
135 transform(rtf.internalField(), t.value(), tf.internalField());
136 transform(rtf.boundaryField(), t.value(), tf.boundaryField());
140 template<class Type, template<class> class PatchField, class GeoMesh>
141 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
143 const dimensionedTensor& t,
144 const GeometricField<Type, PatchField, GeoMesh>& tf
147 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf
149 new GeometricField<vector, PatchField, GeoMesh>
153 "transform(" + t.name() + ',' + tf.name() + ')',
164 transform(tranf(), t, tf);
170 template<class Type, template<class> class PatchField, class GeoMesh>
171 tmp<GeometricField<Type, PatchField, GeoMesh> > transform
173 const dimensionedTensor& t,
174 const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
177 tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // ************************ vim: set sw=4 sts=4 et: ************************ //