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::directionMixedFvPatchField
29 Foam::directionMixedFvPatchField
32 directionMixedFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef directionMixedFvPatchField_H
37 #define directionMixedFvPatchField_H
39 #include "transformFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class directionMixedFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class directionMixedFvPatchField
53 public transformFvPatchField<Type>
58 Field<Type> refValue_;
60 //- Normal gradient field
63 //- Fraction (0-1) of value used for boundary condition
64 symmTensorField valueFraction_;
69 //- Runtime type information
70 TypeName("directionMixed");
75 //- Construct from patch and internal field
76 directionMixedFvPatchField
79 const DimensionedField<Type, volMesh>&
82 //- Construct from patch, internal field and dictionary
83 directionMixedFvPatchField
86 const DimensionedField<Type, volMesh>&,
90 //- Construct by mapping given directionMixedFvPatchField onto
92 directionMixedFvPatchField
94 const directionMixedFvPatchField<Type>&,
96 const DimensionedField<Type, volMesh>&,
97 const fvPatchFieldMapper&
100 //- Construct and return a clone
101 virtual tmp<fvPatchField<Type> > clone() const
103 return tmp<fvPatchField<Type> >
105 new directionMixedFvPatchField<Type>(*this)
109 //- Construct as copy setting internal field reference
110 directionMixedFvPatchField
112 const directionMixedFvPatchField<Type>&,
113 const DimensionedField<Type, volMesh>&
116 //- Construct and return a clone setting internal field reference
117 virtual tmp<fvPatchField<Type> > clone
119 const DimensionedField<Type, volMesh>& iF
122 return tmp<fvPatchField<Type> >
124 new directionMixedFvPatchField<Type>(*this, iF)
133 //- Return true if this patch field fixes a value.
134 // Needed to check if a level has to be specified while solving
135 // Poissons equations.
136 virtual bool fixesValue() const
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 // Return defining fields
160 virtual Field<Type>& refValue()
165 virtual const Field<Type>& refValue() const
170 virtual Field<Type>& refGrad()
175 virtual const Field<Type>& refGrad() const
180 virtual symmTensorField& valueFraction()
182 return valueFraction_;
185 virtual const symmTensorField& valueFraction() const
187 return valueFraction_;
191 // Evaluation functions
193 //- Return gradient at boundary
194 virtual tmp<Field<Type> > snGrad() const;
196 //- Evaluate the patch field
197 virtual void evaluate
199 const Pstream::commsTypes commsType=Pstream::blocking
202 //- Return face-gradient transform diagonal
203 virtual tmp<Field<Type> > snGradTransformDiag() const;
207 virtual void write(Ostream&) const;
212 virtual void operator=(const fvPatchField<Type>&) {}
213 virtual void operator+=(const fvPatchField<Type>&) {}
214 virtual void operator-=(const fvPatchField<Type>&) {}
215 virtual void operator*=(const fvPatchField<Type>&) {}
216 virtual void operator/=(const fvPatchField<Type>&) {}
218 virtual void operator=(const Field<Type>&) {}
219 virtual void operator+=(const Field<Type>&) {}
220 virtual void operator-=(const Field<Type>&) {}
221 virtual void operator*=(const Field<scalar>&) {}
222 virtual void operator/=(const Field<scalar>&) {}
224 virtual void operator=(const Type&) {}
225 virtual void operator+=(const Type&) {}
226 virtual void operator-=(const Type&) {}
227 virtual void operator*=(const scalar) {}
228 virtual void operator/=(const scalar) {}
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 } // End namespace Foam
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
239 # include "directionMixedFvPatchField.C"
242 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
246 // ************************************************************************* //