Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <OpenFOAM/error.H>
00027 #include "absorptionEmissionModel.H"
00028
00029
00030
00031 Foam::autoPtr<Foam::radiation::absorptionEmissionModel>
00032 Foam::radiation::absorptionEmissionModel::New
00033 (
00034 const dictionary& dict,
00035 const fvMesh& mesh
00036 )
00037 {
00038 word absorptionEmissionModelType(dict.lookup("absorptionEmissionModel"));
00039
00040 Info<< "Selecting absorptionEmissionModel "
00041 << absorptionEmissionModelType << endl;
00042
00043 dictionaryConstructorTable::iterator cstrIter =
00044 dictionaryConstructorTablePtr_->find(absorptionEmissionModelType);
00045
00046 if (cstrIter == dictionaryConstructorTablePtr_->end())
00047 {
00048 FatalErrorIn
00049 (
00050 "absorptionEmissionModel::New(const dictionary&, const fvMesh&)"
00051 ) << "Unknown absorptionEmissionModelType type "
00052 << absorptionEmissionModelType
00053 << ", constructor not in hash table" << nl << nl
00054 << " Valid absorptionEmissionModel types are :" << nl
00055 << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
00056 }
00057
00058 return autoPtr<absorptionEmissionModel>(cstrIter()(dict, mesh));
00059 }
00060
00061
00062