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 "faceZone.H"
00029 #include <OpenFOAM/dictionary.H>
00030
00031
00032
00033
00034
00035 Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
00036 (
00037 const word& name,
00038 const dictionary& dict,
00039 const label index,
00040 const faceZoneMesh& zm
00041 )
00042 {
00043 if (debug)
00044 {
00045 Info<< "faceZone::New(const word&, const dictionary&, const label, "
00046 "const faceZoneMesh&) : constructing faceZone " << 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 "faceZone::New(const word&, const dictionary&, "
00060 "const label, const faceZoneMesh&)",
00061 dict
00062 ) << "Unknown faceZone type " << zoneType << endl << endl
00063 << "Valid faceZone types are :" << endl
00064 << dictionaryConstructorTablePtr_->sortedToc()
00065 << exit(FatalIOError);
00066 }
00067
00068 return autoPtr<faceZone>(cstrIter()(name, dict, index, zm));
00069 }
00070
00071
00072
00073
00074