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