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/>.
35 \*---------------------------------------------------------------------------*/
37 #ifndef ignitionSite_H
38 #define ignitionSite_H
41 #include "labelList.H"
42 #include "scalarList.H"
44 #include "dictionary.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class ignitionSite Declaration
57 \*---------------------------------------------------------------------------*/
66 dictionary ignitionSiteDict_;
75 scalarList cellVolumes_;
77 //- Current time index.
78 // Used during the update for moving meshes
79 mutable label timeIndex_;
82 // Private Member Functions
84 void findIgnitionCells(const fvMesh&);
91 //- Class used for the read-construction of
92 // PtrLists of ignitionSite
100 iNew(const Time& db, const fvMesh& mesh)
106 autoPtr<ignitionSite> operator()(Istream& is) const
108 return autoPtr<ignitionSite>(new ignitionSite(is, db_, mesh_));
115 //- Construct from Istream and database
116 ignitionSite(Istream&, const Time&, const fvMesh&);
118 //- Construct from Istream and engineTime
119 ignitionSite(Istream&, const engineTime&, const fvMesh&);
122 autoPtr<ignitionSite> clone() const
124 return autoPtr<ignitionSite>(new ignitionSite(*this));
132 const vector& location() const
137 scalar diameter() const
147 scalar duration() const
152 scalar strength() const
157 //- Return the ignition cells updated if the mesh moved
158 const labelList& cells() const;
160 const scalarList& cellVolumes() const
168 bool igniting() const;
170 bool ignited() const;
175 void operator=(const ignitionSite&);
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************************************************************* //