|
|
|
pointSourceProperties.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) 1991-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::pointSourceProperties 00027 00028 Description 00029 Helper class to describe point source properties 00030 00031 SourceFiles 00032 pointSourceProperties.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef pointSourceProperties_H 00037 #define pointSourceProperties_H 00038 00039 #include "IOdictionary.H" 00040 #include "fvMesh.H" 00041 #include "Time.H" 00042 #include "Tuple2.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class pointSourceProperties Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class pointSourceProperties 00054 { 00055 protected: 00056 00057 // Protected data 00058 00059 typedef Tuple2<word, scalar> fieldNameValuePair; 00060 00061 //- Source name 00062 word name_; 00063 00064 //- Time start 00065 scalar timeStart_; 00066 00067 //- Duration 00068 scalar duration_; 00069 00070 //- Point location 00071 point location_; 00072 00073 //- List of source field name vs value pairs 00074 List<fieldNameValuePair> fieldData_; 00075 00076 00077 public: 00078 00079 // Constructors 00080 00081 //- Construct null 00082 pointSourceProperties(); 00083 00084 //- Construct from dictionary 00085 pointSourceProperties(const dictionary& dict); 00086 00087 //- Construct from Istream 00088 pointSourceProperties(Istream& is); 00089 00090 //- Copy constructor 00091 pointSourceProperties(const pointSourceProperties&); 00092 00093 00094 // Member Functions 00095 00096 // Access 00097 00098 //- Return const access to the source name 00099 inline const word& name() const; 00100 00101 //- Return const access to the time start 00102 inline scalar timeStart() const; 00103 00104 //- Return const access to the time end 00105 inline scalar timeEnd() const; 00106 00107 //- Return const access to the duration 00108 inline scalar duration() const; 00109 00110 //- Return const access to the point location 00111 inline const point& location() const; 00112 00113 //- Return const access to the source field name vs value pairs 00114 inline const List<fieldNameValuePair>& fieldData() const; 00115 00116 00117 // Edit 00118 00119 //- Return access to the source name 00120 inline word& name(); 00121 00122 //- Return access to the time start 00123 inline scalar& timeStart(); 00124 00125 //- Return access to the duration 00126 inline scalar& duration(); 00127 00128 //- Return access to the point location 00129 inline point& location(); 00130 00131 //- Return access to the source field name vs value pairs 00132 inline List<fieldNameValuePair>& fieldData(); 00133 00134 00135 // Member Operators 00136 00137 void operator=(const pointSourceProperties&); 00138 00139 // IOstream operators 00140 00141 friend Istream& operator>>(Istream&, pointSourceProperties&); 00142 friend Ostream& operator<<(Ostream&, const pointSourceProperties&); 00143 }; 00144 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 } // End namespace Foam 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 #include "pointSourcePropertiesI.H" 00153 00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00155 00156 #endif 00157 00158 // ************************************************************************* // |