1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
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 FieldField.
27 \*---------------------------------------------------------------------------*/
29 #include "transformFieldField.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * //
38 template<template<class> class Field, class Type>
41 FieldField<Field, Type>& rtf,
42 const FieldField<Field, tensor>& trf,
43 const FieldField<Field, Type>& tf
48 transform(rtf[i], trf[i], tf[i]);
53 template<template<class> class Field, class Type>
54 tmp<FieldField<Field, Type> > transform
56 const FieldField<Field, tensor>& trf,
57 const FieldField<Field, Type>& tf
60 tmp<FieldField<Field, Type> > tranf
62 FieldField<Field, Type>::NewCalculatedType(tf)
64 transform(tranf(), trf, tf);
69 template<template<class> class Field, class Type>
70 tmp<FieldField<Field, Type> > transform
72 const FieldField<Field, tensor>& trf,
73 const tmp<FieldField<Field, Type> >& ttf
76 tmp<FieldField<Field, Type> > tranf(ttf.ptr());
77 transform(tranf(), trf, tranf());
82 template<template<class> class Field, class Type>
83 tmp<FieldField<Field, Type> > transform
85 const tmp<FieldField<Field, tensor> >& ttrf,
86 const FieldField<Field, Type>& tf
89 tmp<FieldField<Field, Type> > tranf
91 FieldField<Field, Type>::NewCalculatedType(tf)
93 transform(tranf(), ttrf(), tf);
99 template<template<class> class Field, class Type>
100 tmp<FieldField<Field, Type> > transform
102 const tmp<FieldField<Field, tensor> >& ttrf,
103 const tmp<FieldField<Field, Type> >& ttf
106 tmp<FieldField<Field, Type> > tranf(ttf.ptr());
107 transform(tranf(), ttrf(), tranf());
113 template<template<class> class Field, class Type>
116 FieldField<Field, Type>& rtf,
118 const FieldField<Field, Type>& tf
123 transform(rtf[i], t, tf[i]);
128 template<template<class> class Field, class Type>
129 tmp<FieldField<Field, Type> > transform
132 const FieldField<Field, Type>& tf
135 tmp<FieldField<Field, Type> > tranf
137 FieldField<Field, Type>::NewCalculatedType(tf)
139 transform(tranf(), t, tf);
144 template<template<class> class Field, class Type>
145 tmp<FieldField<Field, Type> > transform
148 const tmp<FieldField<Field, Type> >& ttf
151 tmp<FieldField<Field, Type> > tranf(ttf.ptr());
152 transform(tranf(), t, tranf());
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // ************************************************************************* //