All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
indexedCell.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM 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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "indexedCell.H"
27 
28 // * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
29 
30 template<class Gt, class Cb>
31 Foam::Ostream& Foam::operator<<
32 (
33  Ostream& os,
34  const InfoProxy<CGAL::indexedCell<Gt, Cb>>& p
35 )
36 {
37  const CGAL::indexedCell<Gt, Cb>& iv = p.t_;
38 
39  os << "Cell: ";
40 
41  if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctFar)
42  {
43  os << "far";
44  }
45  else if (iv.index_ >= 0)
46  {
47  os << iv.index_;
48  }
49  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctInternal)
50  {
51  os << "internal";
52  }
53  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctSurface)
54  {
55  os << "surface";
56  }
57  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctFeatureEdge)
58  {
59  os << "featureEdge";
60  }
61  else if (iv.index_ == CGAL::indexedCell<Gt, Cb>::ctFeaturePoint)
62  {
63  os << "featurePoint";
64  }
65  else
66  {
67  os << "unassigned";
68  }
69 
70  if (iv.parallelDualVertex())
71  {
72  os << " (processor)";
73  }
74  else
75  {
76  os << " (local)";
77  }
78 
79  os << " filterCount: " << iv.filterCount_ << nl;
80  os << " " << iv.vertex(0)->info();
81  os << " " << iv.vertex(1)->info();
82  os << " " << iv.vertex(2)->info();
83  os << " " << iv.vertex(3)->info();
84 
85  return os;
86 }
87 
88 
89 // ************************************************************************* //
bool parallelDualVertex() const
Does the Dual vertex form part of a processor patch.
Definition: indexedCellI.H:269
An indexed form of CGAL::Triangulation_cell_base_3<K> used to keep track of the Delaunay cells (tets)...
Definition: indexedCell.H:56
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
static const char nl
Definition: Ostream.H:260
Foam::InfoProxy< indexedCell< Gt, Cb > > info() const
Return info proxy.
Definition: indexedCell.H:245
volScalarField & p