39 namespace surfaceWriters
63 precision_(
IOstream::defaultPrecision()),
81 options.getOrDefault(
"precision",
IOstream::defaultPrecision())
83 writeNormal_(options.getOrDefault(
"normal", false))
97 open(surf, outputPath, parallel);
112 open(
points, faces, 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;
139 const meshedSurfRef& surf = adjustSurface();
144 const faceList& faces = surf.faces();
145 const bool withFaceNormal = (writeNormal_ && !this->isPointData());
152 OFstream
os(outputFile, streamOpt_);
153 os.precision(precision_);
157 os <<
"# geometry NO_DATA " << faces.size() <<
nl;
167 for (
const face&
f : faces)
A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A surfaceWriter for raw output.
A simple container for options an IOstream can normally have.
static std::string path(const std::string &str)
Return directory path name (part before last /)
word ext() const
Return file name extension (part after last .)
Macros for easy insertion into run-time selection tables.
Abstract definition of a meshed surface defined by faces and points.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
List< face > faceList
List of faces.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
vectorField pointField
pointField is a vectorField.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
defineSurfaceWriterWriteFields(Foam::surfaceWriters::rawWriter)
static void writePoint(Ostream &os, const point &p)
virtual fileName write()
Write surface geometry to file.
OBJstream os(runTime.globalPath()/outputName)
Convenience macros for instantiating surfaceWriter methods.
defineTypeName(abaqusWriter)
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static void writeHeaderArea(Ostream &os)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Base class for surface writers.
rawWriter()
Default construct.
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)