1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::TimeActivatedExplicitSourceList
28 List of time activeted explict sources
31 TimeActivatedExplicitSourceList.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef TimeActivatedExplicitSourceList_H
36 #define TimeActivatedExplicitSourceList_H
38 #include "IOPtrList.H"
39 #include "TimeActivatedExplicitSource.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Forward declaration of classes
50 class TimeActivatedExplicitSource;
53 class TimeActivatedExplicitSourceList;
55 // Forward declaration of friend functions
61 const TimeActivatedExplicitSourceList<Type>&
64 /*---------------------------------------------------------------------------*\
65 Class TimeActivatedExplicitSourceList Declaration
66 \*---------------------------------------------------------------------------*/
69 class TimeActivatedExplicitSourceList
71 public IOPtrList<TimeActivatedExplicitSource<Type> >
77 //- Name of source properties list
80 //- Reference to the mesh database
83 //- Dimensions of source properties
84 dimensionSet dimensions_;
86 //- List of field names the source is working on
90 // Private Member Functions
92 //- Disallow default bitwise copy construct
93 TimeActivatedExplicitSourceList
95 const TimeActivatedExplicitSourceList<Type>&
98 //- Disallow default bitwise assignment
99 void operator=(const TimeActivatedExplicitSourceList<Type>&);
106 //- Construct from components with list of field names
107 TimeActivatedExplicitSourceList
111 const dimensionSet& dimensions,
112 const wordList& fieldNames
115 //- Construct from components with single field name
116 TimeActivatedExplicitSourceList
120 const dimensionSet& dimensions,
121 const word& fieldName
129 //- Return the source for field, fieldI
130 tmp<DimensionedField<Type, volMesh> > Su
132 const label fieldI = 0
135 //- Return the total source for all fields
136 tmp<DimensionedField<Type, volMesh> > SuTot();
142 //- Read data from Istream
143 bool readData(Istream& is);
145 //- Write data to Istream
146 bool writeData(Ostream& os) const;
149 friend Ostream& operator<< <Type>
152 const TimeActivatedExplicitSourceList& sources
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 # include "TimeActivatedExplicitSourceList.C"
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 // ************************************************************************* //