57 <<
"Cannot read file " << filename
81 storedPoints().transfer(reader.points());
84 for (
const auto& lineVerts : reader.lines())
86 if (lineVerts.size() > 1)
88 nEdges += (lineVerts.size()-1);
91 storedEdges().resize(nEdges);
94 for (
const auto& lineVerts : reader.lines())
96 for (label i = 1; i < lineVerts.size(); ++i)
98 storedEdges()[nEdges++] = edge(lineVerts[i-1], lineVerts[i]);
108 const fileName& filename,
109 const edgeMesh& eMesh,
133 writer.beginFile(
"OpenFOAM edgeMesh");
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edgesCentres")))
Input from file stream as an ISstream, normally using std::ifstream for the actual input.
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A simple container for options an IOstream can normally have.
bool good() const noexcept
True if next operation might succeed.
static unsigned int defaultPrecision() noexcept
Return the default precision.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
pointField & storedPoints() noexcept
Non-const access to global points.
edgeMesh(const faMesh &mesh)
Construct finite-area edge mesh faMesh reference.
const pointField & points() const noexcept
Return points.
const edgeList & edges() const noexcept
Return edges.
edgeList & storedEdges() noexcept
Non-const access to the edges.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge 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 noexcept
1D cells (=open lines)
const pointField & points() const noexcept
Points.
Write edge/points (optionally with fields) as a vtp file or a legacy vtk file.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
unsigned precision() const noexcept
Return the ASCII write precision.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
@ LEGACY_ASCII
Legacy ASCII, legacyAsciiFormatter.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)