1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM 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 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "zeroGradientFvPatchField.H"
28 #include "fvPatchFieldMapper.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
38 zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
41 const DimensionedField<Type, volMesh>& iF
44 fvPatchField<Type>(p, iF)
49 zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
51 const zeroGradientFvPatchField<Type>& ptf,
53 const DimensionedField<Type, volMesh>& iF,
54 const fvPatchFieldMapper& mapper
57 fvPatchField<Type>(ptf, p, iF, mapper)
62 zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
65 const DimensionedField<Type, volMesh>& iF,
66 const dictionary& dict
69 fvPatchField<Type>(p, iF, dict)
71 fvPatchField<Type>::operator=(this->patchInternalField());
76 zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
78 const zeroGradientFvPatchField& zgpf
81 fvPatchField<Type>(zgpf)
86 zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
88 const zeroGradientFvPatchField& zgpf,
89 const DimensionedField<Type, volMesh>& iF
92 fvPatchField<Type>(zgpf, iF)
96 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
99 void zeroGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
101 if (!this->updated())
103 this->updateCoeffs();
106 fvPatchField<Type>::operator==(this->patchInternalField());
107 fvPatchField<Type>::evaluate();
112 tmp<Field<Type> > zeroGradientFvPatchField<Type>::valueInternalCoeffs
114 const tmp<scalarField>&
117 return tmp<Field<Type> >
119 new Field<Type>(this->size(), pTraits<Type>::one)
125 tmp<Field<Type> > zeroGradientFvPatchField<Type>::valueBoundaryCoeffs
127 const tmp<scalarField>&
130 return tmp<Field<Type> >
132 new Field<Type>(this->size(), pTraits<Type>::zero)
138 tmp<Field<Type> > zeroGradientFvPatchField<Type>::gradientInternalCoeffs() const
140 return tmp<Field<Type> >
142 new Field<Type>(this->size(), pTraits<Type>::zero)
148 tmp<Field<Type> > zeroGradientFvPatchField<Type>::gradientBoundaryCoeffs() const
150 return tmp<Field<Type> >
152 new Field<Type>(this->size(), pTraits<Type>::zero)
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // ************************************************************************* //