42 os <<
"# vtk DataFile Version 2.0" <<
nl
46 <<
"DATASET POLYDATA" <<
nl;
49 os <<
"POINTS " << pointLst.
size() <<
" float" <<
nl;
52 const point& pt = pointLst[ptI];
54 os << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
nl;
65 os <<
"LINES " << edgeLst.
size() <<
' ' << 3*edgeLst.
size() <<
nl;
69 const edge&
e = edgeLst[edgeI];
71 os <<
"2 " <<
e[0] <<
' ' <<
e[1] <<
nl;
98 <<
"Cannot read file " << filename
129 storedPoints().transfer(reader.
points());
134 nEdges += reader.
lines()[lineI].
size()-1;
136 storedEdges().setSize(nEdges);
144 storedEdges()[nEdges++] =
edge(verts[i-1], verts[i]);
162 <<
"Cannot open file for writing " << filename
167 writeEdges(os, eMesh.
edges());
#define forAll(list, i)
Loop across all elements in list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
bool good() const
Return true if next operation might succeed.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the UList.
static string dateTime()
Return the current wall-clock date/time as a string.
Points connected by edges.
const edgeList & edges() const
Return edges.
const pointField & points() const
Return points.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A class for handling file names.
Registry of regIOobjects.
Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only.
const labelListList & lines() const
1D cells (=open lines)
const pointField & points() const
Points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool read(const char *, int32_t &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.