1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36 \*---------------------------------------------------------------------------*/
38 #ifndef ignitionSite_H
39 #define ignitionSite_H
42 #include "labelList.H"
43 #include "scalarList.H"
45 #include "dictionary.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class ignitionSite Declaration
58 \*---------------------------------------------------------------------------*/
67 dictionary ignitionSiteDict_;
76 scalarList cellVolumes_;
78 //- Current time index.
79 // Used during the update for moving meshes
80 mutable label timeIndex_;
83 // Private Member Functions
85 void findIgnitionCells(const fvMesh&);
92 //- Class used for the read-construction of
93 // PtrLists of ignitionSite
101 iNew(const Time& db, const fvMesh& mesh)
107 autoPtr<ignitionSite> operator()(Istream& is) const
109 return autoPtr<ignitionSite>(new ignitionSite(is, db_, mesh_));
116 //- Construct from Istream and database
117 ignitionSite(Istream&, const Time&, const fvMesh&);
119 //- Construct from Istream and engineTime
120 ignitionSite(Istream&, const engineTime&, const fvMesh&);
123 autoPtr<ignitionSite> clone() const
125 return autoPtr<ignitionSite>(new ignitionSite(*this));
133 const vector& location() const
138 scalar diameter() const
148 scalar duration() const
153 scalar strength() const
158 //- Return the ignition cells updated if the mesh moved
159 const labelList& cells() const;
161 const scalarList& cellVolumes() const
169 bool igniting() const;
171 bool ignited() const;
176 void operator=(const ignitionSite&);
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace Foam
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 // ************************************************************************* //