fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvPatchFields / derived / fixedNormalSlip / fixedNormalSlipFvPatchField.H
blobb91f62ccd6e371eaf95b7685bced8c40d6ddfefb
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
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::fixedNormalSlipFvPatchField
28 Description
29     Foam::fixedNormalSlipFvPatchField
31 SourceFiles
32     fixedNormalSlipFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fixedNormalSlipFvPatchField_H
37 #define fixedNormalSlipFvPatchField_H
39 #include "transformFvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                       Class fixedNormalSlipFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class fixedNormalSlipFvPatchField
53     public transformFvPatchField<Type>
55     // Private data
57         //- Value the normal component of which the boundary is set to
58         Field<Type> fixedValue_;
61 public:
63     //- Runtime type information
64     TypeName("fixedNormalSlip");
67     // Constructors
69         //- Construct from patch and internal field
70         fixedNormalSlipFvPatchField
71         (
72             const fvPatch&,
73             const DimensionedField<Type, volMesh>&
74         );
76         //- Construct from patch, internal field and dictionary
77         fixedNormalSlipFvPatchField
78         (
79             const fvPatch&,
80             const DimensionedField<Type, volMesh>&,
81             const dictionary&
82         );
84         //- Construct by mapping given fixedNormalSlipFvPatchField
85         //  onto a new patch
86         fixedNormalSlipFvPatchField
87         (
88             const fixedNormalSlipFvPatchField<Type>&,
89             const fvPatch&,
90             const DimensionedField<Type, volMesh>&,
91             const fvPatchFieldMapper&
92         );
94         //- Construct as copy
95         fixedNormalSlipFvPatchField
96         (
97             const fixedNormalSlipFvPatchField<Type>&
98         );
100         //- Construct and return a clone
101         virtual tmp<fvPatchField<Type> > clone() const
102         {
103             return tmp<fvPatchField<Type> >
104             (
105                 new fixedNormalSlipFvPatchField<Type>(*this)
106             );
107         }
109         //- Construct as copy setting internal field reference
110         fixedNormalSlipFvPatchField
111         (
112             const fixedNormalSlipFvPatchField<Type>&,
113             const DimensionedField<Type, volMesh>&
114         );
116         //- Construct and return a clone setting internal field reference
117         virtual tmp<fvPatchField<Type> > clone
118         (
119             const DimensionedField<Type, volMesh>& iF
120         ) const
121         {
122             return tmp<fvPatchField<Type> >
123             (
124                 new fixedNormalSlipFvPatchField<Type>(*this, iF)
125             );
126         }
129     // Member functions
131         // Mapping functions
133             //- Map (and resize as needed) from self given a mapping object
134             virtual void autoMap
135             (
136                 const fvPatchFieldMapper&
137             );
139             //- Reverse map the given fvPatchField onto this fvPatchField
140             virtual void rmap
141             (
142                 const fvPatchField<Type>&,
143                 const labelList&
144             );
147         // Return defining fields
149             virtual Field<Type>& fixedValue()
150             {
151                 return fixedValue_;
152             }
154             virtual const Field<Type>& fixedValue() const
155             {
156                 return fixedValue_;
157             }
160         // Evaluation functions
162             //- Return gradient at boundary
163             virtual tmp<Field<Type> > snGrad() const;
165             //- Evaluate the patch field
166             virtual void evaluate
167             (
168                 const Pstream::commsTypes commsType=Pstream::blocking
169             );
171             //- Return face-gradient transform diagonal
172             virtual tmp<Field<Type> > snGradTransformDiag() const;
175         //- Write
176         virtual void write(Ostream&) const;
179     // Member operators
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 #ifdef NoRepository
210 #   include "fixedNormalSlipFvPatchField.C"
211 #endif
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 #endif
217 // ************************************************************************* //