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;
78 Foam::fileFormats::VTKedgeFormat::VTKedgeFormat
99 "fileFormats::VTKedgeFormat::read(const fileName&)" 100 ) <<
"Cannot read file " << filename
133 storedPoints().transfer(reader.
points());
138 nEdges += reader.
lines()[lineI].
size()-1;
140 storedEdges().setSize(nEdges);
148 storedEdges()[nEdges++] =
edge(verts[i-1], verts[i]);
167 "fileFormats::VTKedgeFormat::write" 168 "(const fileName&, const edgeMesh&)" 169 ) <<
"Cannot open file for writing " << filename
173 writeHeader(os, eMesh.
points());
174 writeEdges(os, eMesh.
edges());
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const pointField & points() const
Return points.
void size(const label)
Override size to be inconsistent with allocated storage.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void writeEdges(Ostream &, const UList< edge > &)
Write edges.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static void write(const fileName &, const edgeMesh &)
Write surface mesh components by proxy.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const labelListList & lines() const
1D cells (=open lines)
const dimensionedScalar e
Elementary charge.
bool good() const
Return true if next operation might succeed.
Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only...
label size() const
Return the number of elements in the UList.
virtual bool read(const fileName &)
Read from file.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
static void writeHeader(Ostream &, const pointField &)
Write header information with points.
Points connected by edges.
Registry of regIOobjects.
A class for handling file names.
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...
bool read(const char *, int32_t &)
const pointField & points() const
Points.
const edgeList & edges() const
Return edges.