Go to the documentation of this file.
39 namespace surfaceWriters
55 os <<
p.x() <<
' ' <<
p.y() <<
' ' <<
p.z();
75 writeCompression_(
IOstream::UNCOMPRESSED)
105 open(surf, outputPath, parallel);
120 open(
points, faces, outputPath, parallel);
133 if (useTimeDir() && !
timeName().empty())
136 outputFile = outputPath_.
path() /
timeName() / outputPath_.name();
138 outputFile.
ext(
"raw");
142 Info<<
"Writing geometry to " << outputFile <<
endl;
168 os <<
"# geometry NO_DATA " << faces.size() <<
nl
173 for (
const face&
f : faces)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling words, derived from Foam::string.
Base class for surface writers.
A class for handling file names.
static std::string path(const std::string &str)
Return directory path name (part before last /)
virtual const faceList & faces() const =0
The faces used for the surface.
An IOstream is an abstract base class for all input/output systems; be they streams,...
static const versionNumber currentVersion
The current version number.
Abstract definition of a meshed surface defined by faces and points.
defineTypeName(boundaryDataWriter)
Ostream & endl(Ostream &os)
Add newline and flush stream.
T lookupOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Convenience macros for instantiating surfaceWriter methods.
static void writePoint(Foam::Ostream &os, const Foam::point &p)
messageStream Info
Information stream (uses stdout - output is on the master only)
static compressionType compressionEnum(const word &compName)
The compression enum corresponding to the string.
virtual const pointField & points() const =0
The points used for the surface.
A surfaceWriter for raw output.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
word ext() const
Return file name extension (part after last .)
Output to file stream, using an OSstream.
static bool master(const label communicator=0)
Am I the master process.
addToRunTimeSelectionTable(surfaceWriter, boundaryDataWriter, word)
rawWriter()
Construct null.
defineSurfaceWriterWriteFields(Foam::surfaceWriters::rawWriter)
A face is a list of labels corresponding to mesh vertices.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual fileName write()
Write surface geometry to file.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?