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::fixedNormalSlipFvPatchField
29 Foam::fixedNormalSlipFvPatchField
32 fixedNormalSlipFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fixedNormalSlipFvPatchField_H
37 #define fixedNormalSlipFvPatchField_H
39 #include "transformFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class fixedNormalSlipFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class fixedNormalSlipFvPatchField
53 public transformFvPatchField<Type>
57 //- Value the normal component of which the boundary is set to
58 Field<Type> fixedValue_;
63 //- Runtime type information
64 TypeName("fixedNormalSlip");
69 //- Construct from patch and internal field
70 fixedNormalSlipFvPatchField
73 const DimensionedField<Type, volMesh>&
76 //- Construct from patch, internal field and dictionary
77 fixedNormalSlipFvPatchField
80 const DimensionedField<Type, volMesh>&,
84 //- Construct by mapping given fixedNormalSlipFvPatchField
86 fixedNormalSlipFvPatchField
88 const fixedNormalSlipFvPatchField<Type>&,
90 const DimensionedField<Type, volMesh>&,
91 const fvPatchFieldMapper&
95 fixedNormalSlipFvPatchField
97 const fixedNormalSlipFvPatchField<Type>&
100 //- Construct and return a clone
101 virtual tmp<fvPatchField<Type> > clone() const
103 return tmp<fvPatchField<Type> >
105 new fixedNormalSlipFvPatchField<Type>(*this)
109 //- Construct as copy setting internal field reference
110 fixedNormalSlipFvPatchField
112 const fixedNormalSlipFvPatchField<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 fixedNormalSlipFvPatchField<Type>(*this, iF)
133 //- Map (and resize as needed) from self given a mapping object
136 const fvPatchFieldMapper&
139 //- Reverse map the given fvPatchField onto this fvPatchField
142 const fvPatchField<Type>&,
147 // Return defining fields
149 virtual Field<Type>& fixedValue()
154 virtual const Field<Type>& fixedValue() const
160 // Evaluation functions
162 //- Return gradient at boundary
163 virtual tmp<Field<Type> > snGrad() const;
165 //- Evaluate the patch field
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 "fixedNormalSlipFvPatchField.C"
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 // ************************************************************************* //