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/>.
28 Holds labels and coordinates of points making a tet.
29 It is used for exchanging data over processors
33 \*---------------------------------------------------------------------------*/
38 #include "labelledPoint.H"
39 #include "contiguous.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class parPartTet Declaration
48 \*---------------------------------------------------------------------------*/
53 labelledPoint pts_[4];
62 explicit inline parPartTet
64 const labelledPoint& p0,
65 const labelledPoint& p1,
66 const labelledPoint& p2,
67 const labelledPoint& p3
85 inline const labelledPoint& operator[](const label i) const
90 inline bool operator !=(const parPartTet& ptf) const
92 Serr << "Not implemented" << endl;
100 inline friend Ostream& operator<<(Ostream& os, const parPartTet& ppt)
102 os << token::BEGIN_LIST;
103 os << ppt.pts_[0] << token::SPACE;
104 os << ppt.pts_[1] << token::SPACE;
105 os << ppt.pts_[2] << token::SPACE;
107 os << token::END_LIST;
109 // Check state of Ostream
110 os.check("operator<<(Ostream&, const parPartTet&");
114 inline friend Istream& operator>>(Istream& is, parPartTet& ppt)
116 // Read beginning of parPartTet
117 is.readBegin("parPartTet");
119 for(label i=0;i<4;++i)
122 // Read end of parHelper
123 is.readEnd("parPartTet");
125 // Check state of Istream
126 is.check("operator>>(Istream&, parPartTet");
132 //- Specify data associated with parPartTet type is contiguous
134 inline bool contiguous<parPartTet>() {return true;}
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 // ************************************************************************* //