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