Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / finiteVolume / fields / fvPatchFields / basic / transform / transformFvPatchField.C
blob9da87fcc24399569fefde6d889b5be97851737d9
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "transformFvPatchField.H"
27 #include "IOstreams.H"
28 #include "transformField.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 namespace Foam
35 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
37 template<class Type>
38 transformFvPatchField<Type>::transformFvPatchField
40     const fvPatch& p,
41     const DimensionedField<Type, volMesh>& iF
44    fvPatchField<Type>(p, iF)
48 template<class Type>
49 transformFvPatchField<Type>::transformFvPatchField
51     const transformFvPatchField<Type>& ptf,
52     const fvPatch& p,
53     const DimensionedField<Type, volMesh>& iF,
54     const fvPatchFieldMapper& mapper
57     fvPatchField<Type>(ptf, p, iF, mapper)
61 template<class Type>
62 transformFvPatchField<Type>::transformFvPatchField
64     const fvPatch& p,
65     const DimensionedField<Type, volMesh>& iF,
66     const dictionary& dict
69     fvPatchField<Type>(p, iF, dict)
73 template<class Type>
74 transformFvPatchField<Type>::transformFvPatchField
76     const transformFvPatchField<Type>& ptf
79     fvPatchField<Type>(ptf)
83 template<class Type>
84 transformFvPatchField<Type>::transformFvPatchField
86     const transformFvPatchField<Type>& ptf,
87     const DimensionedField<Type, volMesh>& iF
90     fvPatchField<Type>(ptf, iF)
94 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
96 template<class Type>
97 tmp<Field<Type> > transformFvPatchField<Type>::valueInternalCoeffs
99     const tmp<scalarField>&
100 ) const
102     return pTraits<Type>::one - snGradTransformDiag();
106 template<class Type>
107 tmp<Field<Type> > transformFvPatchField<Type>::valueBoundaryCoeffs
109     const tmp<scalarField>&
110 ) const
112     return
113         *this
114       - cmptMultiply
115         (
116             valueInternalCoeffs(this->patch().weights()),
117             this->patchInternalField()
118         );
122 template<class Type>
123 tmp<Field<Type> > transformFvPatchField<Type>::gradientInternalCoeffs() const
125     return -this->patch().deltaCoeffs()*snGradTransformDiag();
129 template<class Type>
130 tmp<Field<Type> > transformFvPatchField<Type>::gradientBoundaryCoeffs() const
132     return
133         snGrad()
134       - cmptMultiply(gradientInternalCoeffs(), this->patchInternalField());
138 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
140 template<class Type>
141 void transformFvPatchField<Type>::operator=
143     const fvPatchField<Type>& ptf
146     this->evaluate();
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // ************************************************************************* //