FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

transformFvPatchField.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 #include "transformFvPatchField.H"
00027 #include <OpenFOAM/IOstreams.H>
00028 #include <OpenFOAM/transformField.H>
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00036 
00037 template<class Type>
00038 transformFvPatchField<Type>::transformFvPatchField
00039 (
00040     const fvPatch& p,
00041     const DimensionedField<Type, volMesh>& iF
00042 )
00043 :
00044    fvPatchField<Type>(p, iF)
00045 {}
00046 
00047 
00048 template<class Type>
00049 transformFvPatchField<Type>::transformFvPatchField
00050 (
00051     const transformFvPatchField<Type>& ptf,
00052     const fvPatch& p,
00053     const DimensionedField<Type, volMesh>& iF,
00054     const fvPatchFieldMapper& mapper
00055 )
00056 :
00057     fvPatchField<Type>(ptf, p, iF, mapper)
00058 {}
00059 
00060 
00061 template<class Type>
00062 transformFvPatchField<Type>::transformFvPatchField
00063 (
00064     const fvPatch& p,
00065     const DimensionedField<Type, volMesh>& iF,
00066     const dictionary& dict
00067 )
00068 :
00069     fvPatchField<Type>(p, iF, dict)
00070 {}
00071 
00072 
00073 template<class Type>
00074 transformFvPatchField<Type>::transformFvPatchField
00075 (
00076     const transformFvPatchField<Type>& ptf
00077 )
00078 :
00079     fvPatchField<Type>(ptf)
00080 {}
00081 
00082 
00083 template<class Type>
00084 transformFvPatchField<Type>::transformFvPatchField
00085 (
00086     const transformFvPatchField<Type>& ptf,
00087     const DimensionedField<Type, volMesh>& iF
00088 )
00089 :
00090     fvPatchField<Type>(ptf, iF)
00091 {}
00092 
00093 
00094 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00095 
00096 template<class Type>
00097 tmp<Field<Type> > transformFvPatchField<Type>::valueInternalCoeffs
00098 (
00099     const tmp<scalarField>&
00100 ) const
00101 {
00102     return pTraits<Type>::one - snGradTransformDiag();
00103 }
00104 
00105 
00106 template<class Type>
00107 tmp<Field<Type> > transformFvPatchField<Type>::valueBoundaryCoeffs
00108 (
00109     const tmp<scalarField>&
00110 ) const
00111 {
00112     return
00113         *this
00114       - cmptMultiply
00115         (
00116             valueInternalCoeffs(this->patch().weights()),
00117             this->patchInternalField()
00118         );
00119 }
00120 
00121 
00122 template<class Type>
00123 tmp<Field<Type> > transformFvPatchField<Type>::gradientInternalCoeffs() const
00124 {
00125     return -this->patch().deltaCoeffs()*snGradTransformDiag();
00126 }
00127 
00128 
00129 template<class Type>
00130 tmp<Field<Type> > transformFvPatchField<Type>::gradientBoundaryCoeffs() const
00131 {
00132     return 
00133         snGrad()
00134       - cmptMultiply(gradientInternalCoeffs(), this->patchInternalField());
00135 }
00136 
00137 
00138 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
00139 
00140 template<class Type>
00141 void transformFvPatchField<Type>::operator=
00142 (
00143     const fvPatchField<Type>& ptf
00144 )
00145 {
00146     this->evaluate();
00147 }
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines