37template<
class Triangulation>
40 const fileName& fName,
41 const Triangulation& t,
42 const indexedVertexEnum::vertexType startPointType,
43 const indexedVertexEnum::vertexType endPointType
49 <<
"Writing points of types ("
50 << int(startPointType) <<
"-" << int(endPointType)
51 <<
") to " << str.name() <<
endl;
56 t.finite_vertices_begin();
57 vit != t.finite_vertices_end();
61 if (vit->type() >= startPointType && vit->type() <= endPointType)
63 meshTools::writeOBJ(str,
topoint(vit->point()));
69template<
class Triangulation>
72 const fileName& fName,
73 const Triangulation& t,
74 const indexedVertexEnum::vertexType pointType
77 writeOBJ(fName, t, pointType, pointType);
81template<
class Triangulation>
84 const fileName& fName,
85 const Triangulation& t
91 <<
"Writing fixed points to " << str.name() <<
endl;
96 t.finite_vertices_begin();
97 vit != t.finite_vertices_end();
103 meshTools::writeOBJ(str,
topoint(vit->point()));
109template<
class Triangulation>
112 const fileName& fName,
113 const Triangulation& t
119 <<
"Writing boundary points to " << str.name() <<
endl;
124 t.finite_vertices_begin();
125 vit != t.finite_vertices_end();
129 if (!vit->internalPoint())
131 meshTools::writeOBJ(str,
topoint(vit->point()));
137template<
class Triangulation>
140 const fileName& fName,
141 const Triangulation& t,
142 const faceList& faces
152 t.finite_cells_begin();
153 cit != t.finite_cells_end();
157 if (!cit->hasFarPoint() && !t.is_infinite(cit))
159 points[cit->cellIndex()] = cit->dual();
163 meshTools::writeOBJ(str, faces,
points);
167template<
class Triangulation>
170 const fileName& instance,
171 const Triangulation& t
174 pointField internalDelaunayVertices(t.number_of_vertices());
181 t.finite_vertices_begin();
182 vit != t.finite_vertices_end();
186 if (vit->internalPoint())
188 internalDelaunayVertices[vertI++] =
topoint(vit->point());
192 internalDelaunayVertices.setSize(vertI);
198 "internalDelaunayVertices",
204 internalDelaunayVertices
208 <<
"Writing " << internalDVs.name()
209 <<
" to " << internalDVs.instance()
216template<
class CellHandle>
227 os <<
"# cell index: " << label(
c->cellIndex())
228 <<
" INT_MIN = " << INT_MIN
231 os <<
"# circumradius "
235 for (
int i = 0; i < 4; i++)
237 os <<
"# index / type / procIndex: "
238 << label(
c->vertex(i)->index()) <<
" "
239 << label(
c->vertex(i)->type()) <<
" "
240 << label(
c->vertex(i)->procIndex())
244 ?
" # This vertex is uninitialised!"
249 meshTools::writeOBJ(
os,
topoint(
c->vertex(i)->point()));
252 os <<
"f " << 1 + offset <<
" " << 3 + offset <<
" " << 2 + offset <<
nl
253 <<
"f " << 2 + offset <<
" " << 3 + offset <<
" " << 4 + offset <<
nl
254 <<
"f " << 1 + offset <<
" " << 4 + offset <<
" " << 3 + offset <<
nl
255 <<
"f " << 1 + offset <<
" " << 2 + offset <<
" " << 4 + offset <<
endl;
265template<
class Triangulation>
268 const Triangulation& t
271 tmp<pointField> tpts(
new pointField(t.vertexCount(), point::max));
277 t.finite_vertices_begin();
278 vit != t.finite_vertices_end();
282 if (vit->internalOrBoundaryPoint() && !vit->referred())
284 pts[vit->index()] =
topoint(vit->point());
Triangulation::Finite_vertices_iterator Finite_vertices_iterator
Triangulation::Finite_cells_iterator Finite_cells_iterator
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
A class for managing temporary objects.
OBJstream os(runTime.globalPath()/outputName)
bool uninitialised(const VertexType &v)
const dimensionedScalar c
Speed of light in a vacuum.
pointFromPoint topoint(const Point &P)
messageStream Info
Information stream (stdout output on master, null elsewhere)
vectorField pointField
pointField is a vectorField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vectorIOField pointIOField
pointIOField is a vectorIOField.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
constexpr char nl
The newline '\n' character (0x0a)