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 "addToRunTimeSelectionTable.H"
30 #include "eBoundaryMesh.H"
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(ePatch, 0);
43 defineRunTimeSelectionTable(ePatch, word);
44 defineRunTimeSelectionTable(ePatch, dictionary);
46 addToRunTimeSelectionTable(ePatch, ePatch, word);
47 addToRunTimeSelectionTable(ePatch, ePatch, dictionary);
49 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
57 const eBoundaryMesh& bm
60 patchIdentifier(name, index),
67 // Construct from dictionary
71 const dictionary& dict,
73 const eBoundaryMesh& bm
76 patchIdentifier(name, dict, index),
78 start_(readLabel(dict.lookup("start"))),
79 size_(readLabel(dict.lookup("size")))
83 //- Construct as copy, resetting the boundary mesh
84 ePatch::ePatch(const ePatch& p, const eBoundaryMesh& bm)
86 patchIdentifier(p, p.index()),
94 ePatch::ePatch(const ePatch& p)
97 boundaryMesh_(p.boundaryMesh_),
103 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
109 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
111 const eBoundaryMesh& ePatch::boundaryMesh() const
113 return boundaryMesh_;
117 void ePatch::write(Ostream& os) const
119 os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
120 os.writeKeyword("start") << start() << token::END_STATEMENT << nl;
121 os.writeKeyword("size") << size() << token::END_STATEMENT << nl;
122 patchIdentifier::write(os);
126 //- Assignment operator
127 void ePatch::operator=(const ePatch& p)
129 patchIdentifier::operator=(p);
135 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
137 Ostream& operator<<(Ostream& os, const ePatch& p)
140 os.check("Ostream& operator<<(Ostream& f, const faPatch& p)");
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // ************************************************************************* //