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

UniformDimensionedField.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) 2009-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::UniformDimensionedField
00026 
00027 Description
00028     Dimensioned<Type> registered with the database as a registered IOobject
00029     which has the functionality of a uniform field and allows values from the
00030     top-level code to be passed to boundary conditions etc.
00031 
00032 SourceFiles
00033     UniformDimensionedField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef UniformDimensionedField_H
00038 #define UniformDimensionedField_H
00039 
00040 #include <OpenFOAM/regIOobject.H>
00041 #include <OpenFOAM/dimensionedType.H>
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                      Class UniformDimensionedField Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 template<class Type>
00053 class UniformDimensionedField
00054 :
00055     public regIOobject,
00056     public dimensioned<Type>
00057 {
00058 
00059 public:
00060 
00061     //- Runtime type information
00062     TypeName("UniformDimensionedField");
00063 
00064 
00065     // Constructors
00066 
00067         //- Construct null
00068         UniformDimensionedField();
00069 
00070         //- Construct from components
00071         UniformDimensionedField(const IOobject&, const dimensioned<Type>&);
00072 
00073         //- Construct as copy
00074         UniformDimensionedField(const UniformDimensionedField<Type>&);
00075 
00076         //- Construct from Istream
00077         UniformDimensionedField(const IOobject&);
00078 
00079 
00080     //- Destructor
00081     virtual ~UniformDimensionedField();
00082 
00083 
00084     // Member Functions
00085 
00086         //- Name function provided to resolve the ambiguity between the
00087         //  name functions in regIOobject and dimensioned<Type>
00088         virtual const word& name() const
00089         {
00090             return dimensioned<Type>::name();
00091         }
00092 
00093         bool writeData(Ostream&) const;
00094 
00095 
00096     // Member Operators
00097 
00098         void operator=(const UniformDimensionedField<Type>&);
00099         void operator=(const dimensioned<Type>&);
00100 };
00101 
00102 
00103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00104 
00105 } // End namespace Foam
00106 
00107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00108 
00109 #ifdef NoRepository
00110 #   include "UniformDimensionedField.C"
00111 #endif
00112 
00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114 
00115 #endif
00116 
00117 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines