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::partialSlipFvPatchField
28 Foam::partialSlipFvPatchField
31 partialSlipFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef partialSlipFvPatchField_H
36 #define partialSlipFvPatchField_H
38 #include "transformFvPatchField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class partialSlipFvPatch Declaration
47 \*---------------------------------------------------------------------------*/
50 class partialSlipFvPatchField
52 public transformFvPatchField<Type>
56 //- Fraction (0-1) of value used for boundary condition
57 scalarField valueFraction_;
62 //- Runtime type information
63 TypeName("partialSlip");
68 //- Construct from patch and internal field
69 partialSlipFvPatchField
72 const DimensionedField<Type, volMesh>&
75 //- Construct from patch, internal field and dictionary
76 partialSlipFvPatchField
79 const DimensionedField<Type, volMesh>&,
83 //- Construct by mapping given partialSlipFvPatchField onto a new patch
84 partialSlipFvPatchField
86 const partialSlipFvPatchField<Type>&,
88 const DimensionedField<Type, volMesh>&,
89 const fvPatchFieldMapper&
93 partialSlipFvPatchField
95 const partialSlipFvPatchField<Type>&
98 //- Construct and return a clone
99 virtual tmp<fvPatchField<Type> > clone() const
101 return tmp<fvPatchField<Type> >
103 new partialSlipFvPatchField<Type>(*this)
107 //- Construct as copy setting internal field reference
108 partialSlipFvPatchField
110 const partialSlipFvPatchField<Type>&,
111 const DimensionedField<Type, volMesh>&
114 //- Construct and return a clone setting internal field reference
115 virtual tmp<fvPatchField<Type> > clone
117 const DimensionedField<Type, volMesh>& iF
120 return tmp<fvPatchField<Type> >
122 new partialSlipFvPatchField<Type>(*this, iF)
131 //- Map (and resize as needed) from self given a mapping object
134 const fvPatchFieldMapper&
137 //- Reverse map the given fvPatchField onto this fvPatchField
140 const fvPatchField<Type>&,
145 // Return defining fields
147 virtual scalarField& valueFraction()
149 return valueFraction_;
152 virtual const scalarField& valueFraction() const
154 return valueFraction_;
158 // Evaluation functions
160 //- Return gradient at boundary
161 virtual tmp<Field<Type> > snGrad() const;
163 //- Evaluate the patch field
164 // Default argument needed to allow call in constructors
166 virtual void evaluate
168 const Pstream::commsTypes commsType = Pstream::blocking
171 //- Return face-gradient transform diagonal
172 virtual tmp<Field<Type> > snGradTransformDiag() const;
176 virtual void write(Ostream&) const;
181 virtual void operator=(const UList<Type>&) {}
183 virtual void operator=(const fvPatchField<Type>&) {}
184 virtual void operator+=(const fvPatchField<Type>&) {}
185 virtual void operator-=(const fvPatchField<Type>&) {}
186 virtual void operator*=(const fvPatchField<scalar>&) {}
187 virtual void operator/=(const fvPatchField<scalar>&) {}
189 virtual void operator+=(const Field<Type>&) {}
190 virtual void operator-=(const Field<Type>&) {}
192 virtual void operator*=(const Field<scalar>&) {}
193 virtual void operator/=(const Field<scalar>&) {}
195 virtual void operator=(const Type&) {}
196 virtual void operator+=(const Type&) {}
197 virtual void operator-=(const Type&) {}
198 virtual void operator*=(const scalar) {}
199 virtual void operator/=(const scalar) {}
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 } // End namespace Foam
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 # include "partialSlipFvPatchField.C"
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 // ************************************************************************* //