42 os <<
"# vtk DataFile Version 2.0" <<
nl 43 <<
"featureEdgeMesh written " << clock::dateTime().c_str() <<
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
131 storedPoints().transfer(reader.
points());
136 nEdges += reader.
lines()[lineI].
size()-1;
138 storedEdges().setSize(nEdges);
146 storedEdges()[nEdges++] =
edge(verts[i-1], verts[i]);
164 <<
"Cannot open file for writing " << filename
169 writeEdges(os, eMesh.
edges());
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool good() const
Return true if next operation might succeed.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const edgeList & edges() const
Return edges.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const pointField & points() const
Return points.
Points connected by edges.
const labelListList & lines() const
1D cells (=open lines)
Registry of regIOobjects.
label size() const
Return the number of elements in the UList.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const pointField & points() const
Points.
const dimensionedScalar e
Elementary charge.