OpenFOAM logo
Open Source CFD Toolkit

timeVaryingUniformFixedValueFvPatchField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     timeVaryingUniformFixedValueFvPatchField
00027 
00028 Description
00029 
00030 SourceFiles
00031     timeVaryingUniformFixedValueFvPatchField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef timeVaryingUniformFixedValueFvPatchField_H
00036 #define timeVaryingUniformFixedValueFvPatchField_H
00037 
00038 #include "fixedValueFvPatchFields.H"
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 class graph;
00046 
00047 /*---------------------------------------------------------------------------*\
00048               Class timeVaryingUniformFixedValueFvPatch Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 template<class Type>
00052 class timeVaryingUniformFixedValueFvPatchField
00053 :
00054     public fixedValueFvPatchField<Type>
00055 {
00056     // Private data
00057 
00058         fileName timeDataFileName_;
00059         autoPtr<graph> timeDataPtr_;
00060 
00061         void checkTable();
00062 
00063 
00064 public:
00065 
00066     //- Runtime type information
00067     TypeName("timeVaryingUniformFixedValue");
00068 
00069 
00070     // Constructors
00071 
00072         //- Construct from patch and internal field
00073         timeVaryingUniformFixedValueFvPatchField
00074         (
00075             const fvPatch&,
00076             const Field<Type>&
00077         );
00078 
00079         //- Construct from patch, internal field and dictionary
00080         timeVaryingUniformFixedValueFvPatchField
00081         (
00082             const fvPatch&,
00083             const Field<Type>&,
00084             const dictionary&
00085         );
00086 
00087         //- Construct by mapping given timeVaryingUniformFixedValueFvPatchField
00088         //  onto a new patch
00089         timeVaryingUniformFixedValueFvPatchField
00090         (
00091             const timeVaryingUniformFixedValueFvPatchField<Type>&,
00092             const fvPatch&,
00093             const Field<Type>&,
00094             const fvPatchFieldMapper&
00095         );
00096 
00097         //- Construct and return a clone
00098         virtual tmp<fvPatchField<Type> > clone() const
00099         {
00100             return tmp<fvPatchField<Type> >
00101             (
00102                 new timeVaryingUniformFixedValueFvPatchField<Type>(*this)
00103             );
00104         }
00105 
00106         //- Construct as copy setting internal field reference
00107         timeVaryingUniformFixedValueFvPatchField
00108         (
00109             const timeVaryingUniformFixedValueFvPatchField<Type>&,
00110             const Field<Type>&
00111         );
00112 
00113         //- Construct and return a clone setting internal field reference
00114         virtual tmp<fvPatchField<Type> > clone(const Field<Type>& iF) const
00115         {
00116             return tmp<fvPatchField<Type> >
00117             (
00118                 new timeVaryingUniformFixedValueFvPatchField<Type>(*this, iF)
00119             );
00120         }
00121 
00122 
00123     // Member functions
00124 
00125         // Access
00126 
00127             //- Return the fluctuation scale
00128             const graph& timeData() const
00129             {
00130                 return timeDataPtr_;
00131             }
00132 
00133             //- Return reference to the fluctuation scale to allow adjustment
00134             graph& timeData()
00135             {
00136                 return timeDataPtr_;
00137             }
00138 
00139 
00140         // Evaluation functions
00141 
00142             //- Update the coefficients associated with the patch field
00143             virtual void updateCoeffs();
00144 
00145 
00146         //- Write
00147         virtual void write(Ostream&) const;
00148 };
00149 
00150 template<>
00151 void timeVaryingUniformFixedValueFvPatchField<scalar>::updateCoeffs();
00152 
00153 template<>
00154 void timeVaryingUniformFixedValueFvPatchField<vector>::updateCoeffs();
00155 
00156 template<>
00157 void timeVaryingUniformFixedValueFvPatchField<tensor>::updateCoeffs();
00158 
00159 template<>
00160 void timeVaryingUniformFixedValueFvPatchField<sphericalTensor>::updateCoeffs();
00161 
00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00163 
00164 } // End namespace Foam
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 #ifdef NoRepository
00169 #   include "timeVaryingUniformFixedValueFvPatchField.C"
00170 #endif
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 #endif
00175 
00176 // ************************************************************************* //
For further information go to www.openfoam.org