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