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::partialSlipFvPatchField
29 Foam::partialSlipFvPatchField
32 partialSlipFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef partialSlipFvPatchField_H
37 #define partialSlipFvPatchField_H
39 #include "transformFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class partialSlipFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class partialSlipFvPatchField
53 public transformFvPatchField<Type>
57 //- Fraction (0-1) of value used for boundary condition
58 scalarField valueFraction_;
63 //- Runtime type information
64 TypeName("partialSlip");
69 //- Construct from patch and internal field
70 partialSlipFvPatchField
73 const DimensionedField<Type, volMesh>&
76 //- Construct from patch, internal field and dictionary
77 partialSlipFvPatchField
80 const DimensionedField<Type, volMesh>&,
84 //- Construct by mapping given partialSlipFvPatchField onto a new patch
85 partialSlipFvPatchField
87 const partialSlipFvPatchField<Type>&,
89 const DimensionedField<Type, volMesh>&,
90 const fvPatchFieldMapper&
94 partialSlipFvPatchField
96 const partialSlipFvPatchField<Type>&
99 //- Construct and return a clone
100 virtual tmp<fvPatchField<Type> > clone() const
102 return tmp<fvPatchField<Type> >
104 new partialSlipFvPatchField<Type>(*this)
108 //- Construct as copy setting internal field reference
109 partialSlipFvPatchField
111 const partialSlipFvPatchField<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 partialSlipFvPatchField<Type>(*this, iF)
132 //- Map (and resize as needed) from self given a mapping object
135 const fvPatchFieldMapper&
138 //- Reverse map the given fvPatchField onto this fvPatchField
141 const fvPatchField<Type>&,
146 // Return defining fields
148 virtual scalarField& valueFraction()
150 return valueFraction_;
153 virtual const scalarField& valueFraction() const
155 return valueFraction_;
159 // Evaluation functions
161 //- Return gradient at boundary
162 virtual tmp<Field<Type> > snGrad() const;
164 //- Evaluate the patch field
165 // Default argument needed to allow call in constructors
167 virtual void evaluate
169 const Pstream::commsTypes commsType = Pstream::blocking
172 //- Return face-gradient transform diagonal
173 virtual tmp<Field<Type> > snGradTransformDiag() const;
177 virtual void write(Ostream&) const;
182 virtual void operator=(const UList<Type>&) {}
184 virtual void operator=(const fvPatchField<Type>&) {}
185 virtual void operator+=(const fvPatchField<Type>&) {}
186 virtual void operator-=(const fvPatchField<Type>&) {}
187 virtual void operator*=(const fvPatchField<scalar>&) {}
188 virtual void operator/=(const fvPatchField<scalar>&) {}
190 virtual void operator+=(const Field<Type>&) {}
191 virtual void operator-=(const Field<Type>&) {}
193 virtual void operator*=(const Field<scalar>&) {}
194 virtual void operator/=(const Field<scalar>&) {}
196 virtual void operator=(const Type&) {}
197 virtual void operator+=(const Type&) {}
198 virtual void operator-=(const Type&) {}
199 virtual void operator*=(const scalar) {}
200 virtual void operator/=(const scalar) {}
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 } // End namespace Foam
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 # include "partialSlipFvPatchField.C"
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 // ************************************************************************* //