Go to the documentation of this file.
44 namespace surfaceWriters
90 open(surf, outputPath, parallel);
105 open(
points, faces, outputPath, parallel);
127 if (!
isDir(surfaceDir))
146 Info<<
"Writing points: " << iopts.objectPath() <<
endl;
153 OFstream osGeom(iopts.objectPath(), streamOpt_);
157 iopts.writeHeader(osGeom);
165 iopts.writeEndDivider(osGeom);
177 Foam::fileName Foam::surfaceWriters::boundaryDataWriter::writeTemplate
179 const word& fieldName,
196 const scalar varScale =
198 std::is_integral<Type>::value
200 : fieldScale_.getOrDefault<scalar>(fieldName, 1)
237 if (this->isPointData())
239 Info<<
"Writing points: " << iopts.objectPath() <<
endl;
243 Info<<
"Writing face centres: " << iopts.objectPath() <<
endl;
250 OFstream osGeom(iopts.objectPath(), streamOpt_);
254 iopts.writeHeader(osGeom);
257 if (this->isPointData())
272 iopts.writeEndDivider(osGeom);
290 OFstream osField(iofld.objectPath(), streamOpt_);
294 iofld.writeHeader(osField);
302 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.
A List obtained as a section of another List.
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 (uses stdout - output is on the master only)
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.
static streamFormat formatEnum(const word &formatName, const streamFormat deflt=streamFormat::ASCII)
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.
const Field< point_type > & faceCentres() const
Return face centres for patch.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
A list of faces which address into the list of points.