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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "genericPolyPatch.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 defineTypeNameAndDebug(genericPolyPatch, 0);
35 addToRunTimeSelectionTable(polyPatch, genericPolyPatch, word);
36 addToRunTimeSelectionTable(polyPatch, genericPolyPatch, dictionary);
40 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
42 Foam::genericPolyPatch::genericPolyPatch
48 const polyBoundaryMesh& bm
51 polyPatch(name, size, start, index, bm)
55 Foam::genericPolyPatch::genericPolyPatch
58 const dictionary& dict,
60 const polyBoundaryMesh& bm
63 polyPatch(name, dict, index, bm),
64 actualTypeName_(dict.lookup("type")),
69 Foam::genericPolyPatch::genericPolyPatch
71 const genericPolyPatch& pp,
72 const polyBoundaryMesh& bm
76 actualTypeName_(pp.actualTypeName_),
81 Foam::genericPolyPatch::genericPolyPatch
83 const genericPolyPatch& pp,
84 const polyBoundaryMesh& bm,
90 polyPatch(pp, bm, index, newSize, newStart),
91 actualTypeName_(pp.actualTypeName_),
96 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
98 Foam::genericPolyPatch::~genericPolyPatch()
102 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
104 void Foam::genericPolyPatch::write(Ostream& os) const
106 os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
107 patchIdentifier::write(os);
108 os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl;
109 os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl;
113 dictionary::const_iterator iter = dict_.begin();
120 iter().keyword() != "type"
121 && iter().keyword() != "nFaces"
122 && iter().keyword() != "startFace"
131 // ************************************************************************* //