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 
00028 #include "thermophysicalFunction.H"
00029 #include <OpenFOAM/HashTable.H>
00030 
00031 
00032 
00033 namespace Foam
00034 {
00035 
00036 
00037 
00038 defineTypeNameAndDebug(thermophysicalFunction, 0);
00039 defineRunTimeSelectionTable(thermophysicalFunction, Istream);
00040 
00041 
00042 
00043 autoPtr<thermophysicalFunction> thermophysicalFunction::New(Istream& is)
00044 {
00045     if (debug)
00046     {
00047         Info<< "thermophysicalFunction::New(Istream&) : "
00048             << "constructing thermophysicalFunction"
00049             << endl;
00050     }
00051 
00052     word thermophysicalFunctionType(is);
00053 
00054     IstreamConstructorTable::iterator cstrIter =
00055         IstreamConstructorTablePtr_->find(thermophysicalFunctionType);
00056 
00057     if (cstrIter == IstreamConstructorTablePtr_->end())
00058     {
00059         FatalErrorIn("thermophysicalFunction::New(Istream&)")
00060             << "Unknown thermophysicalFunction type "
00061             << thermophysicalFunctionType
00062             << endl << endl
00063             << "Valid thermophysicalFunction types are :" << endl
00064             << IstreamConstructorTablePtr_->sortedToc()
00065             << abort(FatalError);
00066     }
00067 
00068     return autoPtr<thermophysicalFunction>(cstrIter()(is));
00069 }
00070 
00071 
00072 
00073 
00074 } 
00075 
00076