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 Foam::fixedValueFvPatchField
29 Foam::fixedValueFvPatchField
32 fixedValueFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fixedValueFvPatchField_H
37 #define fixedValueFvPatchField_H
39 #include "fvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class fixedValueFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class fixedValueFvPatchField
53 public fvPatchField<Type>
58 //- Runtime type information
59 TypeName("fixedValue");
64 //- Construct from patch and internal field
65 fixedValueFvPatchField
68 const DimensionedField<Type, volMesh>&
71 //- Construct from patch, internal field and dictionary
72 fixedValueFvPatchField
75 const DimensionedField<Type, volMesh>&,
79 //- Construct by mapping the given fixedValueFvPatchField<Type>
81 fixedValueFvPatchField
83 const fixedValueFvPatchField<Type>&,
85 const DimensionedField<Type, volMesh>&,
86 const fvPatchFieldMapper&
90 fixedValueFvPatchField
92 const fixedValueFvPatchField<Type>&
95 //- Construct and return a clone
96 virtual tmp<fvPatchField<Type> > clone() const
98 return tmp<fvPatchField<Type> >
100 new fixedValueFvPatchField<Type>(*this)
104 //- Construct as copy setting internal field reference
105 fixedValueFvPatchField
107 const fixedValueFvPatchField<Type>&,
108 const DimensionedField<Type, volMesh>&
111 //- Construct and return a clone setting internal field reference
112 virtual tmp<fvPatchField<Type> > clone
114 const DimensionedField<Type, volMesh>& iF
117 return tmp<fvPatchField<Type> >
119 new fixedValueFvPatchField<Type>(*this, iF)
128 //- Return true if this patch field fixes a value.
129 // Needed to check if a level has to be specified while solving
130 // Poissons equations.
131 virtual bool fixesValue() const
137 // Evaluation functions
139 //- Return the matrix diagonal coefficients corresponding to the
140 // evaluation of the value of this patchField with given weights
141 virtual tmp<Field<Type> > valueInternalCoeffs
143 const tmp<scalarField>&
146 //- Return the matrix source coefficients corresponding to the
147 // evaluation of the value of this patchField with given weights
148 virtual tmp<Field<Type> > valueBoundaryCoeffs
150 const tmp<scalarField>&
153 //- Return the matrix diagonal coefficients corresponding to the
154 // evaluation of the gradient of this patchField
155 virtual tmp<Field<Type> > gradientInternalCoeffs() const;
157 //- Return the matrix source coefficients corresponding to the
158 // evaluation of the gradient of this patchField
159 virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
163 virtual void write(Ostream&) const;
168 virtual void operator=(const UList<Type>&) {}
170 virtual void operator=(const fvPatchField<Type>&) {}
171 virtual void operator+=(const fvPatchField<Type>&) {}
172 virtual void operator-=(const fvPatchField<Type>&) {}
173 virtual void operator*=(const fvPatchField<scalar>&) {}
174 virtual void operator/=(const fvPatchField<scalar>&) {}
176 virtual void operator+=(const Field<Type>&) {}
177 virtual void operator-=(const Field<Type>&) {}
179 virtual void operator*=(const Field<scalar>&) {}
180 virtual void operator/=(const Field<scalar>&) {}
182 virtual void operator=(const Type&) {}
183 virtual void operator+=(const Type&) {}
184 virtual void operator-=(const Type&) {}
185 virtual void operator*=(const scalar) {}
186 virtual void operator/=(const scalar) {}
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace Foam
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 # include "fixedValueFvPatchField.C"
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 // ************************************************************************* //