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 <reactionThermophysicalModels/chemistryReader.H>
00027
00028
00029
00030 template<class ThermoType>
00031 Foam::autoPtr<Foam::chemistryReader<ThermoType> >
00032 Foam::chemistryReader<ThermoType>::New
00033 (
00034 const dictionary& thermoDict
00035 )
00036 {
00037
00038
00039 word chemistryReaderTypeName("chemkinReader");
00040
00041
00042 thermoDict.readIfPresent("chemistryReader", chemistryReaderTypeName);
00043
00044 Info<< "Selecting chemistryReader " << chemistryReaderTypeName << endl;
00045
00046 typename dictionaryConstructorTable::iterator cstrIter =
00047 dictionaryConstructorTablePtr_->find(chemistryReaderTypeName);
00048
00049 if (cstrIter == dictionaryConstructorTablePtr_->end())
00050 {
00051 FatalErrorIn
00052 (
00053 "chemistryReader::New(const dictionary& thermoDict)"
00054 ) << "Unknown chemistryReader type "
00055 << chemistryReaderTypeName << nl << nl
00056 << "Valid chemistryReaders are: " << nl
00057 << dictionaryConstructorTablePtr_->sortedToc()
00058 << exit(FatalError);
00059 }
00060
00061 return autoPtr<chemistryReader<ThermoType> >(cstrIter()(thermoDict));
00062 }
00063
00064
00065