FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

uniformFixedValuePointPatchField.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::uniformFixedValuePointPatchField
00026 
00027 Description
00028     Foam::uniformFixedValuePointPatchField
00029 
00030 SourceFiles
00031     uniformFixedValuePointPatchField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef uniformFixedValuePointPatchField_H
00036 #define uniformFixedValuePointPatchField_H
00037 
00038 #include <OpenFOAM/fixedValuePointPatchField.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046           Class uniformFixedValuePointPatchField Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class Type>
00050 class uniformFixedValuePointPatchField
00051 :
00052     public fixedValuePointPatchField<Type>
00053 {
00054     // Private data
00055 
00056         Type uniformValue_;
00057 
00058 
00059 public:
00060 
00061     //- Runtime type information
00062     TypeName("uniformFixedValue");
00063 
00064 
00065     // Constructors
00066 
00067         //- Construct from patch and internal field
00068         uniformFixedValuePointPatchField
00069         (
00070             const pointPatch&,
00071             const DimensionedField<Type, pointMesh>&
00072         );
00073 
00074         //- Construct from patch, internal field and dictionary
00075         uniformFixedValuePointPatchField
00076         (
00077             const pointPatch&,
00078             const DimensionedField<Type, pointMesh>&,
00079             const dictionary&
00080         );
00081 
00082         //- Construct by mapping given patchField<Type> onto a new patch
00083         uniformFixedValuePointPatchField
00084         (
00085             const uniformFixedValuePointPatchField<Type>&,
00086             const pointPatch&,
00087             const DimensionedField<Type, pointMesh>&,
00088             const pointPatchFieldMapper&
00089         );
00090 
00091         //- Construct as copy
00092         uniformFixedValuePointPatchField
00093         (
00094             const uniformFixedValuePointPatchField<Type>&
00095         );
00096 
00097         //- Construct and return a clone
00098         virtual autoPtr<pointPatchField<Type> > clone() const
00099         {
00100             return autoPtr<pointPatchField<Type> >
00101             (
00102                 new uniformFixedValuePointPatchField<Type>
00103                 (
00104                     *this
00105                 )
00106             );
00107         }
00108 
00109         //- Construct as copy setting internal field reference
00110         uniformFixedValuePointPatchField
00111         (
00112             const uniformFixedValuePointPatchField<Type>&,
00113             const DimensionedField<Type, pointMesh>&
00114         );
00115 
00116 
00117         //- Construct and return a clone setting internal field reference
00118         virtual autoPtr<pointPatchField<Type> > clone
00119         (
00120             const DimensionedField<Type, pointMesh>& iF
00121         ) const
00122         {
00123             return autoPtr<pointPatchField<Type> >
00124             (
00125                 new uniformFixedValuePointPatchField<Type>
00126                 (
00127                     *this,
00128                     iF
00129                 )
00130             );
00131         }
00132 
00133 
00134     // Member functions
00135 
00136         // Access
00137 
00138             //- Return the fluctuation scale
00139             const Type& uniformValue() const
00140             {
00141                 return uniformValue_;
00142             }
00143 
00144             //- Return reference to the fluctuation scale to allow adjustment
00145             Type& uniformValue()
00146             {
00147                 return uniformValue_;
00148             }
00149 
00150 
00151         //- Write
00152         virtual void write(Ostream&) const;
00153 };
00154 
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #ifdef NoRepository
00163 #    include <OpenFOAM/uniformFixedValuePointPatchField.C>
00164 #endif
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 #endif
00169 
00170 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines