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
26 fixedMeanValueFvPatchField
31 fixedMeanValueFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef fixedMeanValueFvPatchField_H
36 #define fixedMeanValueFvPatchField_H
38 #include "fixedValueFvPatchFields.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class fixedMeanValueFvPatchField Declaration
47 \*---------------------------------------------------------------------------*/
50 class fixedMeanValueFvPatchField
52 public fixedValueFvPatchField<Type>
59 //- Current time index
65 //- Runtime type information
66 TypeName("fixedMeanValue");
71 //- Construct from patch and internal field
72 fixedMeanValueFvPatchField
75 const DimensionedField<Type, volMesh>&
78 //- Construct from patch, internal field and dictionary
79 fixedMeanValueFvPatchField
82 const DimensionedField<Type, volMesh>&,
86 //- Construct by mapping given fixedMeanValueFvPatchField
88 fixedMeanValueFvPatchField
90 const fixedMeanValueFvPatchField<Type>&,
92 const DimensionedField<Type, volMesh>&,
93 const fvPatchFieldMapper&
96 //- Construct and return a clone
97 virtual tmp<fvPatchField<Type> > clone() const
99 return tmp<fvPatchField<Type> >
101 new fixedMeanValueFvPatchField<Type>(*this)
105 //- Construct as copy setting internal field reference
106 fixedMeanValueFvPatchField
108 const fixedMeanValueFvPatchField<Type>&,
109 const DimensionedField<Type, volMesh>&
112 //- Construct and return a clone setting internal field reference
113 virtual tmp<fvPatchField<Type> > clone
115 const DimensionedField<Type, volMesh>& iF
118 return tmp<fvPatchField<Type> >
120 new fixedMeanValueFvPatchField<Type>(*this, iF)
129 //- Return the ref value
130 const Type& meanValue() const
135 //- Return reference to the ref value to allow adjustment
144 //- Map (and resize as needed) from self given a mapping object
147 const fvPatchFieldMapper&
150 //- Reverse map the given fvPatchField onto this fvPatchField
153 const fvPatchField<Type>&,
158 // Evaluation functions
160 //- Update the coefficients associated with the patch field
161 virtual void updateCoeffs();
165 virtual void write(Ostream&) const;
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 # include "fixedMeanValueFvPatchField.C"
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 // ************************************************************************* //