OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "transformFvPatchField.H"
00028 #include "IOstreams.H"
00029 #include "transformField.H"
00030 
00031 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00032 
00033 namespace Foam
00034 {
00035 
00036 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00037 
00038 template<class Type>
00039 transformFvPatchField<Type>::transformFvPatchField
00040 (
00041     const fvPatch& p,
00042     const DimensionedField<Type, volMesh>& iF
00043 )
00044 :
00045    fvPatchField<Type>(p, iF)
00046 {}
00047 
00048 
00049 template<class Type>
00050 transformFvPatchField<Type>::transformFvPatchField
00051 (
00052     const transformFvPatchField<Type>& ptf,
00053     const fvPatch& p,
00054     const DimensionedField<Type, volMesh>& iF,
00055     const fvPatchFieldMapper& mapper
00056 )
00057 :
00058     fvPatchField<Type>(ptf, p, iF, mapper)
00059 {}
00060 
00061 
00062 template<class Type>
00063 transformFvPatchField<Type>::transformFvPatchField
00064 (
00065     const fvPatch& p,
00066     const DimensionedField<Type, volMesh>& iF,
00067     const dictionary& dict
00068 )
00069 :
00070     fvPatchField<Type>(p, iF, dict)
00071 {}
00072 
00073 
00074 template<class Type>
00075 transformFvPatchField<Type>::transformFvPatchField
00076 (
00077     const transformFvPatchField<Type>& ptf
00078 )
00079 :
00080     fvPatchField<Type>(ptf)
00081 {}
00082 
00083 
00084 template<class Type>
00085 transformFvPatchField<Type>::transformFvPatchField
00086 (
00087     const transformFvPatchField<Type>& ptf,
00088     const DimensionedField<Type, volMesh>& iF
00089 )
00090 :
00091     fvPatchField<Type>(ptf, iF)
00092 {}
00093 
00094 
00095 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00096 
00097 template<class Type>
00098 tmp<Field<Type> > transformFvPatchField<Type>::valueInternalCoeffs
00099 (
00100     const tmp<scalarField>&
00101 ) const
00102 {
00103     return pTraits<Type>::one - snGradTransformDiag();
00104 }
00105 
00106 
00107 template<class Type>
00108 tmp<Field<Type> > transformFvPatchField<Type>::valueBoundaryCoeffs
00109 (
00110     const tmp<scalarField>&
00111 ) const
00112 {
00113     return
00114         *this
00115       - cmptMultiply
00116         (
00117             valueInternalCoeffs(this->patch().weights()),
00118             this->patchInternalField()
00119         );
00120 }
00121 
00122 
00123 template<class Type>
00124 tmp<Field<Type> > transformFvPatchField<Type>::gradientInternalCoeffs() const
00125 {
00126     return -this->patch().deltaCoeffs()*snGradTransformDiag();
00127 }
00128 
00129 
00130 template<class Type>
00131 tmp<Field<Type> > transformFvPatchField<Type>::gradientBoundaryCoeffs() const
00132 {
00133     return 
00134         snGrad()
00135       - cmptMultiply(gradientInternalCoeffs(), this->patchInternalField());
00136 }
00137 
00138 
00139 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
00140 
00141 template<class Type>
00142 void transformFvPatchField<Type>::operator=
00143 (
00144     const fvPatchField<Type>& ptf
00145 )
00146 {
00147     this->evaluate();
00148 }
00149 
00150 
00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00152 
00153 } // End namespace Foam
00154 
00155 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd