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