Go to the documentation of this file.
44 os <<
"# vtk DataFile Version 2.0" <<
nl
45 <<
"featureEdgeMesh written " << clock::dateTime().c_str() <<
nl
48 <<
"DATASET POLYDATA" <<
nl;
51 os <<
"POINTS " << pointLst.size() <<
" double" <<
nl;
52 for (
const point& pt : pointLst)
54 os << float(pt.x()) <<
' '
55 <<
float(pt.y()) <<
' '
56 <<
float(pt.z()) <<
nl;
67 os <<
"LINES " << edgeLst.
size() <<
' ' << 3*edgeLst.
size() <<
nl;
69 for (
const edge&
e : edgeLst)
71 os <<
"2 " <<
e[0] <<
' ' <<
e[1] <<
nl;
78 Foam::fileFormats::VTKedgeFormat::VTKedgeFormat
98 <<
"Cannot read file " << filename
122 storedPoints().transfer(reader.
points());
127 nEdges += reader.
lines()[lineI].size()-1;
135 for (label i = 1; i < verts.size(); i++)
137 storedEdges()[nEdges++] =
edge(verts[i-1], verts[i]);
155 <<
"Cannot open file for writing " << filename
160 writeEdges(os, eMesh.
edges());
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling file names.
Input from file stream, using an ISstream.
Reader for vtk UNSTRUCTURED_GRID legacy files. Supports single CELLS, POINTS etc. entry only.
const pointField & points() const
Points.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
static void writeHeader(Ostream &os, const word &fieldName)
#define forAll(list, i)
Loop across all elements in list.
Registry of regIOobjects.
const pointField & points() const
Return points.
const edgeList & edges() const
Return edges.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Input/output from file streams.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
Elementary charge.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool good() const
Return true if next operation might succeed.
const labelListList & lines() const
1D cells (=open lines)
void setSize(const label newSize)
Alias for resize(const label)
Mesh data needed to do the Finite Area discretisation.