newScatterModel.C
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
00027 #include "error.H"
00028 #include "scatterModel.H"
00029
00030
00031
00032 Foam::autoPtr<Foam::radiation::scatterModel> Foam::radiation::scatterModel::New
00033 (
00034 const dictionary& dict,
00035 const fvMesh& mesh
00036 )
00037 {
00038 word scatterModelType(dict.lookup("scatterModel"));
00039
00040 Info<< "Selecting scatterModel " << scatterModelType << endl;
00041
00042 dictionaryConstructorTable::iterator cstrIter =
00043 dictionaryConstructorTablePtr_->find(scatterModelType);
00044
00045 if (cstrIter == dictionaryConstructorTablePtr_->end())
00046 {
00047 FatalErrorIn
00048 (
00049 "scatterModel::New(const dictionary&, const fvMesh&)"
00050 ) << "Unknown scatterModelType type "
00051 << scatterModelType
00052 << ", constructor not in hash table" << nl << nl
00053 << " Valid scatterModel types are :" << nl
00054 << dictionaryConstructorTablePtr_->toc()
00055 << exit(FatalError);
00056 }
00057
00058 return autoPtr<scatterModel>(cstrIter()(dict, mesh));
00059 }
00060
00061
00062
Copyright © 2000-2009 OpenCFD Ltd