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 "atomizationModel.H"
00028 #include <dieselSpray/LISA.H>
00029 #include <dieselSpray/noAtomization.H>
00030
00031
00032
00033 namespace Foam
00034 {
00035
00036
00037
00038 autoPtr<atomizationModel> atomizationModel::New
00039 (
00040 const dictionary& dict,
00041 spray& sm
00042 )
00043 {
00044 word atomizationModelType
00045 (
00046 dict.lookup("atomizationModel")
00047 );
00048
00049 Info<< "Selecting atomizationModel "
00050 << atomizationModelType << endl;
00051
00052 dictionaryConstructorTable::iterator cstrIter =
00053 dictionaryConstructorTablePtr_->find(atomizationModelType);
00054
00055 if (cstrIter == dictionaryConstructorTablePtr_->end())
00056 {
00057 FatalError
00058 << "atomizationModel::New(const dictionary&, const spray&) : "
00059 << nl
00060 << " unknown atomizationModelType type "
00061 << atomizationModelType
00062 << ", constructor not in hash table" << nl << nl
00063 << " Valid atomizationModel types are :" << nl
00064 << dictionaryConstructorTablePtr_->sortedToc()
00065 << abort(FatalError);
00066 }
00067
00068 return autoPtr<atomizationModel>(cstrIter()(dict, sm));
00069 }
00070
00071
00072
00073
00074 }
00075
00076