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 <barotropicCompressibilityModel/barotropicCompressibilityModel.H>
00027
00028
00029
00030 Foam::autoPtr<Foam::barotropicCompressibilityModel>
00031 Foam::barotropicCompressibilityModel::New
00032 (
00033 const dictionary& compressibilityProperties,
00034 const volScalarField& gamma,
00035 const word& psiName
00036 )
00037 {
00038 word bcModelTypeName
00039 (
00040 compressibilityProperties.lookup("barotropicCompressibilityModel")
00041 );
00042
00043 Info<< "Selecting compressibility model "
00044 << bcModelTypeName << endl;
00045
00046 dictionaryConstructorTable::iterator cstrIter =
00047 dictionaryConstructorTablePtr_->find(bcModelTypeName);
00048
00049 if (cstrIter == dictionaryConstructorTablePtr_->end())
00050 {
00051 FatalErrorIn
00052 (
00053 "barotropicCompressibilityModel::New(const volScalarField&)"
00054 ) << "Unknown barotropicCompressibilityModel type "
00055 << bcModelTypeName << endl << endl
00056 << "Valid barotropicCompressibilityModels are : " << endl
00057 << dictionaryConstructorTablePtr_->sortedToc()
00058 << exit(FatalError);
00059 }
00060
00061 return autoPtr<barotropicCompressibilityModel>
00062 (
00063 cstrIter()(compressibilityProperties, gamma, psiName)
00064 );
00065 }
00066
00067
00068