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