Go to the documentation of this file.
39 namespace surfaceWriters
63 precision_(
IOstream::defaultPrecision()),
79 IOstream::compressionEnum(
"compression", options)
83 options.getOrDefault(
"precision",
IOstream::defaultPrecision())
85 writeNormal_(options.getOrDefault(
"normal", false)),
86 geometryScale_(options.getOrDefault<scalar>(
"scale", 1)),
87 fieldScale_(options.subOrEmptyDict(
"fieldScale"))
101 open(surf, outputPath, parallel);
116 open(
points, faces, outputPath, parallel);
134 outputFile.
ext(
"raw");
138 Info<<
"Writing geometry to " << outputFile <<
endl;
142 const meshedSurf& surf =
surface();
147 const faceList& faces = surf.faces();
148 const bool withFaceNormal = writeNormal_;
155 OFstream
os(outputFile, streamOpt_);
156 os.precision(precision_);
160 os <<
"# geometry NO_DATA " << faces.size() <<
nl;
170 for (
const face&
f : faces)
vectorField pointField
pointField is a vectorField.
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)
static void writeHeaderArea(Ostream &os)
static std::string name(const std::string &str)
virtual const faceList & faces() const =0
const meshedSurf & surface() const
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)
Ostream & endl(Ostream &os)
static void writeHeaderXYZ(Ostream &os)
Convenience macros for instantiating surfaceWriter methods.
const word & timeName() const
static void writePoint(Ostream &os, const point &p)
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)
Generic templated field type.
virtual const pointField & points() const =0
A surfaceWriter for raw output.
static compressionType compressionEnum(const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED)
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.
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
@ ASCII
"ascii" (normal default)
List< face > faceList
A List of faces.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
defineSurfaceWriterWriteFields(Foam::surfaceWriters::rawWriter)
A face is a list of labels corresponding to mesh vertices.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
bool mkDir(const fileName &pathName, mode_t mode=0777)
bool isDir(const fileName &name, const bool followLink=true)