BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / finiteVolume / fields / fvPatchFields / derived / uniformFixedValue / uniformFixedValueFvPatchField.H
blob0c7b8e82e0b92fedddd5c0692a91cae9927705e9
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::uniformFixedValueFvPatchField
27 Description
28     Foam::uniformFixedValueFvPatchField
30 SourceFiles
31     uniformFixedValueFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef uniformFixedValueFvPatchField_H
36 #define uniformFixedValueFvPatchField_H
38 #include "Random.H"
39 #include "fixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                      Class uniformFixedValueFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class uniformFixedValueFvPatchField
53     public fixedValueFvPatchField<Type>
55     // Private data
57         Type uniformValue_;
60 public:
62     //- Runtime type information
63     TypeName("uniformFixedValue");
66     // Constructors
68         //- Construct from patch and internal field
69         uniformFixedValueFvPatchField
70         (
71             const fvPatch&,
72             const DimensionedField<Type, volMesh>&
73         );
75         //- Construct from patch, internal field and dictionary
76         uniformFixedValueFvPatchField
77         (
78             const fvPatch&,
79             const DimensionedField<Type, volMesh>&,
80             const dictionary&
81         );
83         //- Construct by mapping given uniformFixedValueFvPatchField
84         //  onto a new patch
85         uniformFixedValueFvPatchField
86         (
87             const uniformFixedValueFvPatchField<Type>&,
88             const fvPatch&,
89             const DimensionedField<Type, volMesh>&,
90             const fvPatchFieldMapper&
91         );
93         //- Construct as copy
94         uniformFixedValueFvPatchField
95         (
96             const uniformFixedValueFvPatchField<Type>&
97         );
99         //- Construct and return a clone
100         virtual tmp<fvPatchField<Type> > clone() const
101         {
102             return tmp<fvPatchField<Type> >
103             (
104                 new uniformFixedValueFvPatchField<Type>(*this)
105             );
106         }
108         //- Construct as copy setting internal field reference
109         uniformFixedValueFvPatchField
110         (
111             const uniformFixedValueFvPatchField<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 uniformFixedValueFvPatchField<Type>(*this, iF)
124             );
125         }
128     // Member functions
130         // Access
132             //- Return the fluctuation scale
133             const Type& uniformValue() const
134             {
135                 return uniformValue_;
136             }
138             //- Return reference to the fluctuation scale to allow adjustment
139             Type& uniformValue()
140             {
141                 return uniformValue_;
142             }
145         // Mapping functions
147             //- Map (and resize as needed) from self given a mapping object
148             virtual void autoMap
149             (
150                 const fvPatchFieldMapper&
151             );
154         //- Write
155         virtual void write(Ostream&) const;
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 #ifdef NoRepository
166 #   include "uniformFixedValueFvPatchField.C"
167 #endif
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //