indexedCell.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "indexedCell.H"
29 
30 // * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
31 
32 template<class Gt, class Cb>
33 Foam::Ostream& Foam::operator<<
34 (
35  Ostream& os,
36  const InfoProxy<CGAL::indexedCell<Gt, Cb>>& iproxy
37 )
38 {
39  const auto& iv = *iproxy;
40 
41  os << "Cell: ";
42 
43  if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctFar)
44  {
45  os << "far";
46  }
47  else if (iv.index_ >= 0)
48  {
49  os << iv.index_;
50  }
51  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctInternal)
52  {
53  os << "internal";
54  }
55  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctSurface)
56  {
57  os << "surface";
58  }
59  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctFeatureEdge)
60  {
61  os << "featureEdge";
62  }
63  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctFeaturePoint)
64  {
65  os << "featurePoint";
66  }
67  else
68  {
69  os << "unassigned";
70  }
71 
72  if (iv.parallelDualVertex())
73  {
74  os << " (processor)";
75  }
76  else
77  {
78  os << " (local)";
79  }
80 
81  os << " filterCount: " << iv.filterCount_ << nl;
82  os << " " << iv.vertex(0)->info();
83  os << " " << iv.vertex(1)->info();
84  os << " " << iv.vertex(2)->info();
85  os << " " << iv.vertex(3)->info();
86 
87  return os;
88 }
89 
90 
91 // ************************************************************************* //
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
An indexed form of CGAL::Triangulation_cell_base_3<K> used to keep track of the Delaunay cells (tets)...
Definition: indexedCell.H:62
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)