Go to the documentation of this file.
44 namespace surfaceWriters
90 open(surf, outputPath, parallel);
105 open(
points, faces, outputPath, parallel);
111 void Foam::surfaceWriters::boundaryDataWriter::serialWriteGeometry
122 if (this->isPointData())
135 OFstream osGeom(iopts.
objectPath(), streamOpt_);
142 if (this->isPointData())
152 osGeom << pp.faceCentres();
178 if (!
isDir(surfaceDir))
195 iopts.note() = (this->isPointData() ?
"point data" :
"face data");
197 serialWriteGeometry(iopts, surf);
208 Foam::fileName Foam::surfaceWriters::boundaryDataWriter::writeTemplate
210 const word& fieldName,
227 const scalar varScale =
229 std::is_integral<Type>::value
231 : fieldScale_.getOrDefault<scalar>(fieldName, 1)
264 iopts.note() = (this->isPointData() ?
"point data" :
"face data");
266 serialWriteGeometry(iopts, surf);
282 iofld.note() = (this->isPointData() ?
"point data" :
"face data");
284 OFstream osField(iofld.objectPath(), streamOpt_);
288 iofld.writeHeader(osField);
296 iofld.writeEndDivider(osField);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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.
A primitive field of type <T> with automated input and output.
defineTypeName(abaqusWriter)
static fileName envGlobalPath()
Global case (directory) from environment variable.
static std::string path(const std::string &str)
Return directory path name (part before last /)
A class for managing temporary objects.
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
A surfaceWriter for outputting to a form usable for the timeVaryingMapped boundary condition....
virtual const faceList & faces() const =0
The faces used for the surface.
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.
Convenience macros for instantiating surfaceWriter methods.
boundaryDataWriter()
Default construct.
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Istream and Ostream manipulators taking arguments.
virtual const pointField & points() const =0
The points used for the surface.
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,...
Macros for easy insertion into run-time selection tables.
defineSurfaceWriterWriteFields(Foam::surfaceWriters::boundaryDataWriter)
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Output to file stream, using an OSstream.
virtual fileName write()
Write surface geometry to file.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
static streamFormat formatEnum(const word &formatName, const streamFormat deflt=streamFormat::ASCII)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
bool writeHeader(Ostream &os) const
Write header with current type()
fileName objectPath() const
The complete path + object name.
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?