initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / timeVaryingUniformFixedValue / timeVaryingUniformFixedValueFvPatchField.H
blob0beef446a4ab8870229c8b89152c1611658cec42
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::timeVaryingUniformFixedValueFvPatchField
28 Description
29     A time-varying form of a uniform fixed value boundary condition.
31     Example of the boundary condition specification:
32     @verbatim
33     inlet
34     {
35         type            timeVaryingUniformFixedValue;
36         fileName        "$FOAM_CASE/time-series";
37         outOfBounds     clamp;           // (error|warn|clamp|repeat)
38     }
39     @endverbatim
41 Note
42     This class is derived directly from a fixedValue patch rather than from
43     a uniformFixedValue patch.
45 See Also
46     Foam::interpolationTable and Foam::fixedValueFvPatchField
48 SourceFiles
49     timeVaryingUniformFixedValueFvPatchField.C
51 \*---------------------------------------------------------------------------*/
53 #ifndef timeVaryingUniformFixedValueFvPatchField_H
54 #define timeVaryingUniformFixedValueFvPatchField_H
56 #include "fixedValueFvPatchField.H"
57 #include "interpolationTable.H"
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 namespace Foam
64 /*---------------------------------------------------------------------------*\
65            Class timeVaryingUniformFixedValueFvPatch Declaration
66 \*---------------------------------------------------------------------------*/
68 template<class Type>
69 class timeVaryingUniformFixedValueFvPatchField
71     public fixedValueFvPatchField<Type>
73     // Private data
75         //- The time series being used, including the bounding treatment
76         interpolationTable<Type> timeSeries_;
79 public:
81     //- Runtime type information
82     TypeName("timeVaryingUniformFixedValue");
85     // Constructors
87         //- Construct from patch and internal field
88         timeVaryingUniformFixedValueFvPatchField
89         (
90             const fvPatch&,
91             const DimensionedField<Type, volMesh>&
92         );
94         //- Construct from patch, internal field and dictionary
95         timeVaryingUniformFixedValueFvPatchField
96         (
97             const fvPatch&,
98             const DimensionedField<Type, volMesh>&,
99             const dictionary&
100         );
102         //- Construct by mapping given patch field onto a new patch
103         timeVaryingUniformFixedValueFvPatchField
104         (
105             const timeVaryingUniformFixedValueFvPatchField<Type>&,
106             const fvPatch&,
107             const DimensionedField<Type, volMesh>&,
108             const fvPatchFieldMapper&
109         );
111         //- Construct as copy
112         timeVaryingUniformFixedValueFvPatchField
113         (
114             const timeVaryingUniformFixedValueFvPatchField<Type>&
115         );
117         //- Construct and return a clone
118         virtual tmp<fvPatchField<Type> > clone() const
119         {
120             return tmp<fvPatchField<Type> >
121             (
122                 new timeVaryingUniformFixedValueFvPatchField<Type>(*this)
123             );
124         }
126         //- Construct as copy setting internal field reference
127         timeVaryingUniformFixedValueFvPatchField
128         (
129             const timeVaryingUniformFixedValueFvPatchField<Type>&,
130             const DimensionedField<Type, volMesh>&
131         );
133         //- Construct and return a clone setting internal field reference
134         virtual tmp<fvPatchField<Type> > clone
135         (
136             const DimensionedField<Type, volMesh>& iF
137         ) const
138         {
139             return tmp<fvPatchField<Type> >
140             (
141                 new timeVaryingUniformFixedValueFvPatchField<Type>(*this, iF)
142             );
143         }
146     // Member functions
148         // Access
150             //- Return the time series used
151             const interpolationTable<Type>& timeSeries() const
152             {
153                 return timeSeries_;
154             }
157         // Evaluation functions
159             //- Update the coefficients associated with the patch field
160             virtual void updateCoeffs();
163         //- Write
164         virtual void write(Ostream&) const;
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 } // End namespace Foam
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 #ifdef NoRepository
175 #   include "timeVaryingUniformFixedValueFvPatchField.C"
176 #endif
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 #endif
182 // ************************************************************************* //