1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 cfMesh is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
26 \*---------------------------------------------------------------------------*/
28 #include "boundaryPatch.H"
32 #include "dictionary.H"
33 #include "addToRunTimeSelectionTable.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(boundaryPatch, 0);
41 addToRunTimeSelectionTable(boundaryPatchBase, boundaryPatch, dictionary);
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 boundaryPatch::boundaryPatch
53 boundaryPatchBase(n, t, nF, sF)
56 boundaryPatch::boundaryPatch(const word& name, const dictionary& dict)
58 boundaryPatchBase(name, dict)
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 dictionary boundaryPatch::dict() const
67 dict.add("type", type_);
69 dict.add("nFaces", nFaces_);
70 dict.add("startFace", startFace_);
75 void boundaryPatch::write(Ostream& os) const
80 void boundaryPatch::writeDict(Ostream& os) const
85 Ostream& boundaryPatch::operator<<(Ostream& os) const
87 os << name_ << nl << token::BEGIN_BLOCK << nl
88 << " type " << type_ << token::END_STATEMENT << nl
89 << " nFaces " << nFaces_ << token::END_STATEMENT << nl
90 << " startFace " << startFace_ << token::END_STATEMENT << nl
91 << token::END_BLOCK << endl;
96 Istream& boundaryPatch::operator>>(Istream& is)
100 is >> t >> type_ >> t;
101 is >> t >> nFaces_ >> t;
102 is >> t >> startFace_ >> t;
108 void boundaryPatch::operator=(const boundaryPatch& wp)
112 nFaces_ = wp.nFaces_;
113 startFace_ = wp.startFace_;
116 bool boundaryPatch::operator!=(const boundaryPatch& wp) const
118 if( name_ != wp.name_ )
122 else if( type_ != wp.name_ )
126 else if( (nFaces_ != wp.nFaces_) || (startFace_ != wp.startFace_) )
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //