initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / partialSlip / partialSlipFvPatchField.H
blob649d17f5d6bf4423e588725fb060ae40f3fb5a2c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::partialSlipFvPatchField
28 Description
29     Foam::partialSlipFvPatchField
31 SourceFiles
32     partialSlipFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef partialSlipFvPatchField_H
37 #define partialSlipFvPatchField_H
39 #include "transformFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                       Class partialSlipFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class partialSlipFvPatchField
53     public transformFvPatchField<Type>
55     // Private data
57         //- Fraction (0-1) of value used for boundary condition
58         scalarField valueFraction_;
61 public:
63     //- Runtime type information
64     TypeName("partialSlip");
67     // Constructors
69         //- Construct from patch and internal field
70         partialSlipFvPatchField
71         (
72             const fvPatch&,
73             const DimensionedField<Type, volMesh>&
74         );
76         //- Construct from patch, internal field and dictionary
77         partialSlipFvPatchField
78         (
79             const fvPatch&,
80             const DimensionedField<Type, volMesh>&,
81             const dictionary&
82         );
84         //- Construct by mapping given partialSlipFvPatchField onto a new patch
85         partialSlipFvPatchField
86         (
87             const partialSlipFvPatchField<Type>&,
88             const fvPatch&,
89             const DimensionedField<Type, volMesh>&,
90             const fvPatchFieldMapper&
91         );
93         //- Construct as copy
94         partialSlipFvPatchField
95         (
96             const partialSlipFvPatchField<Type>&
97         );
99         //- Construct and return a clone
100         virtual tmp<fvPatchField<Type> > clone() const
101         {
102             return tmp<fvPatchField<Type> >
103             (
104                 new partialSlipFvPatchField<Type>(*this)
105             );
106         }
108         //- Construct as copy setting internal field reference
109         partialSlipFvPatchField
110         (
111             const partialSlipFvPatchField<Type>&,
112             const DimensionedField<Type, volMesh>&
113         );
115         //- Construct and return a clone setting internal field reference
116         virtual tmp<fvPatchField<Type> > clone
117         (
118             const DimensionedField<Type, volMesh>& iF
119         ) const
120         {
121             return tmp<fvPatchField<Type> >
122             (
123                 new partialSlipFvPatchField<Type>(*this, iF)
124             );
125         }
128     // Member functions
130         // Mapping functions
132             //- Map (and resize as needed) from self given a mapping object
133             virtual void autoMap
134             (
135                 const fvPatchFieldMapper&
136             );
138             //- Reverse map the given fvPatchField onto this fvPatchField
139             virtual void rmap
140             (
141                 const fvPatchField<Type>&,
142                 const labelList&
143             );
146         // Return defining fields
148             virtual scalarField& valueFraction()
149             {
150                 return valueFraction_;
151             }
153             virtual const scalarField& valueFraction() const
154             {
155                 return valueFraction_;
156             }
159         // Evaluation functions
161             //- Return gradient at boundary
162             virtual tmp<Field<Type> > snGrad() const;
164             //- Evaluate the patch field
165             virtual void evaluate
166             (
167                 const Pstream::commsTypes commsType=Pstream::blocking
168             );
170             //- Return face-gradient transform diagonal
171             virtual tmp<Field<Type> > snGradTransformDiag() const;
174         //- Write
175         virtual void write(Ostream&) const;
178     // Member operators
180         virtual void operator=(const UList<Type>&) {}
182         virtual void operator=(const fvPatchField<Type>&) {}
183         virtual void operator+=(const fvPatchField<Type>&) {}
184         virtual void operator-=(const fvPatchField<Type>&) {}
185         virtual void operator*=(const fvPatchField<scalar>&) {}
186         virtual void operator/=(const fvPatchField<scalar>&) {}
188         virtual void operator+=(const Field<Type>&) {}
189         virtual void operator-=(const Field<Type>&) {}
191         virtual void operator*=(const Field<scalar>&) {}
192         virtual void operator/=(const Field<scalar>&) {}
194         virtual void operator=(const Type&) {}
195         virtual void operator+=(const Type&) {}
196         virtual void operator-=(const Type&) {}
197         virtual void operator*=(const scalar) {}
198         virtual void operator/=(const scalar) {}
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 } // End namespace Foam
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 #ifdef NoRepository
209 #   include "partialSlipFvPatchField.C"
210 #endif
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 #endif
216 // ************************************************************************* //