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::fixedValueFvsPatchField
29 Foam::fixedValueFvsPatchField
32 fixedValueFvsPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fixedValueFvsPatchField_H
37 #define fixedValueFvsPatchField_H
39 #include "fvsPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class fixedValueFvsPatchField Declaration
48 \*---------------------------------------------------------------------------*/
51 class fixedValueFvsPatchField
53 public fvsPatchField<Type>
58 //- Runtime type information
59 TypeName("fixedValue");
64 //- Construct from patch and internal field
65 fixedValueFvsPatchField
68 const DimensionedField<Type, surfaceMesh>&
71 //- Construct from patch, internal field and dictionary
72 fixedValueFvsPatchField
75 const DimensionedField<Type, surfaceMesh>&,
79 //- Construct by mapping the given fixedValueFvsPatchField<Type>
81 fixedValueFvsPatchField
83 const fixedValueFvsPatchField<Type>&,
85 const DimensionedField<Type, surfaceMesh>&,
86 const fvPatchFieldMapper&
90 fixedValueFvsPatchField
92 const fixedValueFvsPatchField<Type>&
95 //- Construct and return a clone
96 virtual tmp<fvsPatchField<Type> > clone() const
98 return tmp<fvsPatchField<Type> >
100 new fixedValueFvsPatchField<Type>(*this)
104 //- Construct as copy setting internal field reference
105 fixedValueFvsPatchField
107 const fixedValueFvsPatchField<Type>&,
108 const DimensionedField<Type, surfaceMesh>&
111 //- Construct and return a clone setting internal field reference
112 virtual tmp<fvsPatchField<Type> > clone
114 const DimensionedField<Type, surfaceMesh>& iF
117 return tmp<fvsPatchField<Type> >
119 new fixedValueFvsPatchField<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
138 virtual void write(Ostream&) const;
143 virtual void operator=(const UList<Type>&) {}
145 virtual void operator=(const fvsPatchField<Type>&) {}
146 virtual void operator+=(const fvsPatchField<Type>&) {}
147 virtual void operator-=(const fvsPatchField<Type>&) {}
148 virtual void operator*=(const fvsPatchField<scalar>&) {}
149 virtual void operator/=(const fvsPatchField<scalar>&) {}
151 virtual void operator+=(const Field<Type>&) {}
152 virtual void operator-=(const Field<Type>&) {}
154 virtual void operator*=(const Field<scalar>&) {}
155 virtual void operator/=(const Field<scalar>&) {}
157 virtual void operator=(const Type&) {}
158 virtual void operator+=(const Type&) {}
159 virtual void operator-=(const Type&) {}
160 virtual void operator*=(const scalar) {}
161 virtual void operator/=(const scalar) {}
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 # include "fixedValueFvsPatchField.C"
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 // ************************************************************************* //