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/>.
25 processorBoundaryPatch
28 Writes information for a given processor patch
31 processorBoundaryPatch.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef processorBoundaryPatch_H
36 #define processorBoundaryPatch_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "boundaryPatchBase.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 class processorBoundaryPatch
49 : public boundaryPatchBase
59 // Runtime type information
60 TypeName("processor");
62 // Construct from components
63 processorBoundaryPatch
68 const label startFace,
70 const label neighbProcNo
73 processorBoundaryPatch(const word& name, const dictionary&);
75 // Construct and return a clone
76 virtual autoPtr<boundaryPatchBase> clone() const
78 return autoPtr<boundaryPatchBase>
80 new processorBoundaryPatch
92 virtual autoPtr<boundaryPatchBase> clone
94 const processorBoundaryPatch& pp
97 return autoPtr<boundaryPatchBase>
99 new processorBoundaryPatch
112 //- return the owner processor
113 inline label myProcNo() const
118 //- return the neighbour processor
119 inline label neiProcNo() const
121 return neighbProcNo_;
124 //- check if the processor is the owner of the interface
125 inline bool owner() const
127 if( myProcNo_ < neighbProcNo_ )
133 //- Return as dictionary of entries
134 dictionary dict() const;
138 void write(Ostream&) const;
141 void writeDict(Ostream&) const;
144 Ostream& operator<<(Ostream&) const;
146 Istream& operator>>(Istream&);
148 void operator=(const processorBoundaryPatch&);
150 bool operator!=(const processorBoundaryPatch&) const;
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //