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

TimeActivatedExplicitSourceList.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) 2010-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::TimeActivatedExplicitSourceList
00026 
00027 Description
00028     List of time activeted explict sources
00029 
00030 SourceFiles
00031     TimeActivatedExplicitSourceList.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef TimeActivatedExplicitSourceList_H
00036 #define TimeActivatedExplicitSourceList_H
00037 
00038 #include <OpenFOAM/IOPtrList.H>
00039 #include "TimeActivatedExplicitSource_.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // Forward declaration of classes
00047 class fvMesh;
00048 
00049 template<class Type>
00050 class TimeActivatedExplicitSource;
00051 
00052 template<class Type>
00053 class TimeActivatedExplicitSourceList;
00054 
00055 // Forward declaration of friend functions
00056 
00057 template<class Type>
00058 Ostream& operator<<
00059 (
00060     Ostream&,
00061     const TimeActivatedExplicitSourceList<Type>&
00062 );
00063 
00064 /*---------------------------------------------------------------------------*\
00065              Class TimeActivatedExplicitSourceList Declaration
00066 \*---------------------------------------------------------------------------*/
00067 
00068 template<class Type>
00069 class TimeActivatedExplicitSourceList
00070 :
00071     public IOPtrList<TimeActivatedExplicitSource<Type> >
00072 {
00073 private:
00074 
00075     // Private data
00076 
00077         //- Name of source properties list
00078         word name_;
00079 
00080         //- Reference to the mesh database
00081         const fvMesh& mesh_;
00082 
00083         //- Dimensions of source properties
00084         dimensionSet dimensions_;
00085 
00086         //- List of field names the source is working on
00087         wordList fieldNames_;
00088 
00089 
00090     // Private Member Functions
00091 
00092         //- Disallow default bitwise copy construct
00093         TimeActivatedExplicitSourceList
00094         (
00095             const TimeActivatedExplicitSourceList<Type>&
00096         );
00097 
00098         //- Disallow default bitwise assignment
00099         void operator=(const TimeActivatedExplicitSourceList<Type>&);
00100 
00101 
00102 public:
00103 
00104     // Constructors
00105 
00106         //- Construct from components with list of field names
00107         TimeActivatedExplicitSourceList
00108         (
00109             const word& name,
00110             const fvMesh& mesh,
00111             const dimensionSet& dimensions,
00112             const wordList& fieldNames
00113         );
00114 
00115         //- Construct from components with single field name
00116         TimeActivatedExplicitSourceList
00117         (
00118             const word& name,
00119             const fvMesh& mesh,
00120             const dimensionSet& dimensions,
00121             const word& fieldName
00122         );
00123 
00124 
00125     // Member Functions
00126 
00127         // Evaluation
00128 
00129             //- Return the source for field, fieldI
00130             tmp<DimensionedField<Type, volMesh> > Su
00131             (
00132                 const label fieldI = 0
00133             );
00134 
00135             //- Return the total source for all fields
00136             tmp<DimensionedField<Type, volMesh> > SuTot();
00137 
00138 
00139 
00140         // I-O
00141 
00142             //- Read data from Istream
00143             bool readData(Istream& is);
00144 
00145             //- Write data to Istream
00146             bool writeData(Ostream& os) const;
00147 
00148             //- Ostream operator
00149             friend Ostream& operator<< <Type>
00150             (
00151                 Ostream& os,
00152                 const TimeActivatedExplicitSourceList& sources
00153             );
00154 };
00155 
00156 
00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00158 
00159 } // End namespace Foam
00160 
00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00162 
00163 #ifdef NoRepository
00164 #   include "TimeActivatedExplicitSourceList.C"
00165 #endif
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00168 
00169 #endif
00170 
00171 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines