1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
26 \*---------------------------------------------------------------------------*/
29 #include "dictionary.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
38 autoPtr<ePatch> ePatch::New
40 const word& patchType,
45 const eBoundaryMesh& bm
50 Info<< "ePatch::New(const word&, const word&, const label, "
51 "const label, const label, const eBoundaryMesh&) : "
56 wordConstructorTable::iterator cstrIter =
57 wordConstructorTablePtr_->find(patchType);
59 if (cstrIter == wordConstructorTablePtr_->end())
63 "ePatch::New(const word&, const word&, const label, "
64 "const label, const label, const eBoundaryMesh&) "
65 ) << "Unknown ePatch type " << patchType << " for patch " << name
67 << "Valid ePatch types are :" << endl
68 << wordConstructorTablePtr_->toc()
72 return autoPtr<ePatch>(cstrIter()(name, size, start, index, bm));
76 autoPtr<ePatch> ePatch::New
79 const dictionary& dict,
81 const eBoundaryMesh& bm
86 Info<< "ePatch::New(const word&, const dictionary&, const label, "
87 "const eBoundaryMesh&) : constructing ePatch"
91 word patchType(dict.lookup("type"));
93 dictionaryConstructorTable::iterator cstrIter =
94 dictionaryConstructorTablePtr_->find(patchType);
96 if (cstrIter == dictionaryConstructorTablePtr_->end())
100 "ePatch::New(const word&, const dictionary&, "
101 "const label, const eBoundaryMesh&)",
103 ) << "Unknown ePatch type " << patchType << endl << endl
104 << "Valid ePatch types are :" << endl
105 << dictionaryConstructorTablePtr_->toc()
106 << exit(FatalIOError);
109 return autoPtr<ePatch>(cstrIter()(name, dict, index, bm));
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 } // End namespace Foam
117 // ************************************************************************* //