39namespace surfaceWriters
63 precision_(
IOstream::defaultPrecision()),
81 options.getOrDefault(
"precision",
IOstream::defaultPrecision())
83 writeNormal_(options.getOrDefault(
"normal", false))
97 open(surf, outputPath, parallel);
125 if (useTimeDir() && !
timeName().empty())
128 outputFile = outputPath_.
path() /
timeName() / outputPath_.name();
130 outputFile.
ext(
"raw");
134 Info<<
"Writing geometry to " << outputFile <<
endl;
145 const bool withFaceNormal = writeNormal_;
153 os.precision(precision_);
157 os <<
"# geometry NO_DATA " << faces.
size() <<
nl;
167 for (
const face&
f : faces)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
The IOstreamOption is a simple container for options an IOstream can normally have.
An IOstream is an abstract base class for all input/output systems; be they streams,...
Output to file stream, using an OSstream.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
word ext() const
Return file name extension (part after last .)
static std::string path(const std::string &str)
Return directory path name (part before last /)
Implements a meshed surface by referencing another meshed surface or faces/points components.
virtual const pointField & points() const
The points used for the surface.
virtual const faceList & faces() const
The faces used for the surface.
Abstract definition of a meshed surface defined by faces and points.
splitCell * master() const
Base class for surface writers.
virtual void open(const fileName &outputPath)
Open for output on specified path, using existing surface.
A surfaceWriter for raw output.
rawWriter()
Default construct.
virtual fileName write()
Write surface geometry to file.
A class for handling words, derived from Foam::string.
#define defineTypeName(Type)
Define the typeName.
OBJstream os(runTime.globalPath()/outputName)
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
static void writePoint(Ostream &os, const point &p)
messageStream Info
Information stream (stdout output on master, null elsewhere)
static void writeHeaderArea(Ostream &os)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
constexpr char nl
The newline '\n' character (0x0a)
Convenience macros for instantiating surfaceWriter methods.
#define defineSurfaceWriterWriteFields(ThisClass)