/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2026 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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * // template void transform ( GeometricField& rtf, const GeometricField& trf, const GeometricField& tf ) { transform ( rtf.primitiveFieldRef(), trf.primitiveField(), tf.primitiveField() ); transform ( rtf.boundaryFieldRef(), trf.boundaryField(), tf.boundaryField() ); } template tmp> transform ( const GeometricField& trf, const GeometricField& tf ) { tmp> tranf ( GeometricField::New ( word("transform(", trf.name(), ',', tf.name(), ')'), tf.mesh(), tf.dimensions() ) ); transform(tranf.ref(), trf, tf); return tranf; } template tmp> transform ( const GeometricField& trf, const tmp>& ttf ) { tmp> tranf = transform(trf, ttf()); ttf.clear(); return tranf; } template tmp> transform ( const tmp>& ttrf, const GeometricField& tf ) { tmp> tranf = transform(ttrf(), tf); ttrf.clear(); return tranf; } template tmp> transform ( const tmp>& ttrf, const tmp>& ttf ) { tmp> tranf = transform(ttrf(), ttf()); ttf.clear(); ttrf.clear(); return tranf; } template void transform ( GeometricField& rtf, const dimensionedTensor& t, const GeometricField& tf ) { transform(rtf.primitiveFieldRef(), t.value(), tf.primitiveField()); transform(rtf.boundaryFieldRef(), t.value(), tf.boundaryField()); } template tmp> transform ( const dimensionedTensor& t, const GeometricField& tf ) { tmp> tranf ( GeometricField::New ( word("transform(", t.name(), ',', tf.name(), ')'), tf.mesh(), tf.dimensions() ) ); transform(tranf.ref(), t, tf); return tranf; } template tmp> transform ( const dimensionedTensor& t, const tmp>& ttf ) { tmp> tranf = transform(t, ttf()); ttf.clear(); return tranf; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // ************************************************************************* //