/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Description Spatial transformation functions for FieldFields. \*---------------------------------------------------------------------------*/ #include "transformGeometricField.H" #include "transformField.H" #include "transformFieldField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * // template class PatchField, class GeoMesh> void transform ( GeometricField& rtf, const GeometricField& trf, const GeometricField& tf ) { transform(rtf.internalFieldRef(), trf.internalField(), tf.internalField()); transform(rtf.boundaryFieldRef(), trf.boundaryField(), tf.boundaryField()); } template class PatchField, class GeoMesh> tmp> transform ( const GeometricField& trf, const GeometricField& tf ) { tmp> tranf ( new GeometricField ( IOobject ( "transform(" + trf.name() + ',' + tf.name() + ')', tf.instance(), tf.db(), IOobject::NO_READ, IOobject::NO_WRITE ), tf.mesh(), tf.dimensions() ) ); transform(tranf(), trf, tf); return tranf; } template class PatchField, class GeoMesh> tmp> transform ( const GeometricField& trf, const tmp>& ttf ) { tmp> tranf = transform(trf, ttf()); ttf.clear(); return tranf; } template class PatchField, class GeoMesh> tmp> transform ( const tmp>& ttrf, const GeometricField& tf ) { tmp> tranf = transform(ttrf(), tf); ttrf.clear(); return tranf; } template class PatchField, class GeoMesh> tmp> transform ( const tmp>& ttrf, const tmp>& ttf ) { tmp> tranf = transform(ttrf(), ttf()); ttf.clear(); ttrf.clear(); return tranf; } template class PatchField, class GeoMesh> void transform ( GeometricField& rtf, const dimensionedTensor& t, const GeometricField& tf ) { transform(rtf.internalFieldRef(), t.value(), tf.internalField()); transform(rtf.boundaryFieldRef(), t.value(), tf.boundaryField()); } template class PatchField, class GeoMesh> tmp> transform ( const dimensionedTensor& t, const GeometricField& tf ) { tmp> tranf ( new GeometricField ( IOobject ( "transform(" + t.name() + ',' + tf.name() + ')', tf.instance(), tf.db(), IOobject::NO_READ, IOobject::NO_WRITE ), tf.mesh(), tf.dimensions() ) ); transform(tranf(), t, tf); return tranf; } template class PatchField, class GeoMesh> tmp> transform ( const dimensionedTensor& t, const tmp>& ttf ) { tmp> tranf = transform(t, ttf()); ttf.clear(); return tranf; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // ************************************************************************* //