Go to the documentation of this file.
39 namespace surfaceWriters
63 precision_(
IOstream::defaultPrecision()),
86 geometryScale_(options.
getOrDefault<scalar>(
"scale", 1)),
101 open(surf, outputPath, parallel);
116 open(
points, faces, outputPath, parallel);
129 if (useTimeDir() && !
timeName().empty())
132 outputFile = outputPath_.
path() /
timeName() / outputPath_.name();
134 outputFile.
ext(
"raw");
138 Info<<
"Writing geometry to " << outputFile <<
endl;
148 const bool withFaceNormal = writeNormal_;
156 os.precision(precision_);
160 os <<
"# geometry NO_DATA " << faces.size() <<
nl;
170 for (
const face&
f : faces)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Base class for surface writers.
A class for handling file names.
defineTypeName(abaqusWriter)
static std::string path(const std::string &str)
Return directory path name (part before last /)
static void writeHeaderArea(Ostream &os)
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,...
Abstract definition of a meshed surface defined by faces and points.
static bool master(const label communicator=worldComm)
Am I the master process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeHeaderXYZ(Ostream &os)
Convenience macros for instantiating surfaceWriter methods.
static void writePoint(Ostream &os, const point &p)
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual const pointField & points() const =0
The points used for the surface.
A surfaceWriter for raw output.
static compressionType compressionEnum(const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED)
The compression enum corresponding to the string.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
word ext() const
Return file name extension (part after last .)
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Output to file stream, using an OSstream.
static unsigned int defaultPrecision() noexcept
Return the default precision.
rawWriter()
Default construct.
defineSurfaceWriterWriteFields(Foam::surfaceWriters::rawWriter)
A face is a list of labels corresponding to mesh vertices.
virtual fileName write()
Write surface geometry to file.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
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?