1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::directionMixedFvPatchField
28 Foam::directionMixedFvPatchField
31 directionMixedFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef directionMixedFvPatchField_H
36 #define directionMixedFvPatchField_H
38 #include "transformFvPatchField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class directionMixedFvPatch Declaration
47 \*---------------------------------------------------------------------------*/
50 class directionMixedFvPatchField
52 public transformFvPatchField<Type>
57 Field<Type> refValue_;
59 //- Normal gradient field
62 //- Fraction (0-1) of value used for boundary condition
63 symmTensorField valueFraction_;
68 //- Runtime type information
69 TypeName("directionMixed");
74 //- Construct from patch and internal field
75 directionMixedFvPatchField
78 const DimensionedField<Type, volMesh>&
81 //- Construct from patch, internal field and dictionary
82 directionMixedFvPatchField
85 const DimensionedField<Type, volMesh>&,
89 //- Construct by mapping given directionMixedFvPatchField onto
91 directionMixedFvPatchField
93 const directionMixedFvPatchField<Type>&,
95 const DimensionedField<Type, volMesh>&,
96 const fvPatchFieldMapper&
99 //- Construct and return a clone
100 virtual tmp<fvPatchField<Type> > clone() const
102 return tmp<fvPatchField<Type> >
104 new directionMixedFvPatchField<Type>(*this)
108 //- Construct as copy setting internal field reference
109 directionMixedFvPatchField
111 const directionMixedFvPatchField<Type>&,
112 const DimensionedField<Type, volMesh>&
115 //- Construct and return a clone setting internal field reference
116 virtual tmp<fvPatchField<Type> > clone
118 const DimensionedField<Type, volMesh>& iF
121 return tmp<fvPatchField<Type> >
123 new directionMixedFvPatchField<Type>(*this, iF)
132 //- Return true if this patch field fixes a value.
133 // Needed to check if a level has to be specified while solving
134 // Poissons equations.
135 virtual bool fixesValue() const
143 //- Map (and resize as needed) from self given a mapping object
146 const fvPatchFieldMapper&
149 //- Reverse map the given fvPatchField onto this fvPatchField
152 const fvPatchField<Type>&,
157 // Return defining fields
159 virtual Field<Type>& refValue()
164 virtual const Field<Type>& refValue() const
169 virtual Field<Type>& refGrad()
174 virtual const Field<Type>& refGrad() const
179 virtual symmTensorField& valueFraction()
181 return valueFraction_;
184 virtual const symmTensorField& valueFraction() const
186 return valueFraction_;
190 // Evaluation functions
192 //- Return gradient at boundary
193 virtual tmp<Field<Type> > snGrad() const;
195 //- Evaluate the patch field
196 virtual void evaluate
198 const Pstream::commsTypes commsType = Pstream::blocking
201 //- Return face-gradient transform diagonal
202 virtual tmp<Field<Type> > snGradTransformDiag() const;
206 virtual void write(Ostream&) const;
211 virtual void operator=(const fvPatchField<Type>&) {}
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>&) {}
217 virtual void operator=(const Field<Type>&) {}
218 virtual void operator+=(const Field<Type>&) {}
219 virtual void operator-=(const Field<Type>&) {}
220 virtual void operator*=(const Field<scalar>&) {}
221 virtual void operator/=(const Field<scalar>&) {}
223 virtual void operator=(const Type&) {}
224 virtual void operator+=(const Type&) {}
225 virtual void operator-=(const Type&) {}
226 virtual void operator*=(const scalar) {}
227 virtual void operator/=(const scalar) {}
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 } // End namespace Foam
235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238 # include "directionMixedFvPatchField.C"
241 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
245 // ************************************************************************* //