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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "pyrolysisModel.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace regionModels
36 namespace pyrolysisModels
39 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
41 autoPtr<pyrolysisModel> pyrolysisModel::New(const fvMesh& mesh)
43 // get model name, but do not register the dictionary
50 "pyrolysisProperties",
51 mesh.time().constant(),
57 ).lookup("pyrolysisModel")
60 Info<< "Selecting pyrolysisModel " << modelType << endl;
62 meshConstructorTable::iterator cstrIter =
63 meshConstructorTablePtr_->find(modelType);
65 if (cstrIter == meshConstructorTablePtr_->end())
67 FatalErrorIn("pyrolysisModel::New(const fvMesh&)")
68 << "Unknown pyrolysisModel type " << modelType
69 << nl << nl << "Valid pyrolisisModel types are:" << nl
70 << meshConstructorTablePtr_->sortedToc()
74 return autoPtr<pyrolysisModel>(cstrIter()(modelType, mesh));
78 autoPtr<pyrolysisModel> pyrolysisModel::New
81 const dictionary& dict
85 const word modelType = dict.lookup("pyrolysisModel");
87 Info<< "Selecting pyrolysisModel " << modelType << endl;
89 dictionaryConstructorTable::iterator cstrIter =
90 dictionaryConstructorTablePtr_->find(modelType);
92 if (cstrIter == dictionaryConstructorTablePtr_->end())
94 FatalErrorIn("pyrolysisModel::New(const fvMesh&, const dictionary&)")
95 << "Unknown pyrolysisModel type " << modelType
96 << nl << nl << "Valid pyrolisisModel types are:" << nl
97 << dictionaryConstructorTablePtr_->sortedToc()
101 return autoPtr<pyrolysisModel>(cstrIter()(modelType, mesh, dict));
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 } // End namespace surfaceFilmModels
108 } // End namespace regionModels
109 } // End namespace Foam
111 // ************************************************************************* //