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 
00028 #include "pointZone.H"
00029 #include <OpenFOAM/dictionary.H>
00030 
00031 
00032 
00033 
00034 
00035 Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
00036 (
00037     const word& name,
00038     const dictionary& dict,
00039     const label index,
00040     const pointZoneMesh& zm
00041 )
00042 {
00043     if (debug)
00044     {
00045         Info<< "pointZone::New(const word&, const dictionary&, const label, "
00046                "const pointZoneMesh&) : constructing pointZone " << name
00047             << endl;
00048     }
00049 
00050     word zoneType(dict.lookup("type"));
00051 
00052     dictionaryConstructorTable::iterator cstrIter =
00053         dictionaryConstructorTablePtr_->find(zoneType);
00054 
00055     if (cstrIter == dictionaryConstructorTablePtr_->end())
00056     {
00057         FatalIOErrorIn
00058         (
00059             "pointZone::New(const word&, const dictionary&, "
00060             "const label, const pointZoneMesh&)",
00061             dict
00062         )   << "Unknown pointZone type " << zoneType << endl << endl
00063             << "Valid pointZone types are :" << endl
00064             << dictionaryConstructorTablePtr_->sortedToc()
00065             << exit(FatalIOError);
00066     }
00067 
00068     return autoPtr<pointZone>(cstrIter()(name, dict, index, zm));
00069 }
00070 
00071 
00072 
00073