44namespace surfaceWriters
69 header_(options.getOrDefault(
"header", true)),
88 open(surf, outputPath, parallel);
109void Foam::surfaceWriters::boundaryDataWriter::serialWriteGeometry
120 if (this->isPointData())
133 OFstream osGeom(iopts.
objectPath(), streamOpt_);
140 if (this->isPointData())
150 osGeom << pp.faceCentres();
177 if (!
isDir(surfaceDir))
194 iopts.
note() = (this->isPointData() ?
"point data" :
"face data");
196 serialWriteGeometry(iopts, surf);
209 const word& fieldName,
223 tmp<Field<Type>> tfield = adjustField(fieldName, mergeField(localValues));
227 Info<<
" to " << outputFile <<
endl;
257 iopts.
note() = (this->isPointData() ?
"point data" :
"face data");
259 serialWriteGeometry(iopts, surf);
275 iofld.
note() = (this->isPointData() ?
"point data" :
"face data");
Istream and Ostream manipulators taking arguments.
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.
A primitive field of type <T> with automated input and output.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
const string & note() const noexcept
Return the optional note.
fileName objectPath() const
The complete path + object name.
bool writeHeader(Ostream &os) const
Write header with current type()
The IOstreamOption is a simple container for options an IOstream can normally have.
Output to file stream, using an OSstream.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static fileName envGlobalPath()
Global case (directory) from environment variable.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
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.
Abstract definition of a meshed surface defined by faces and points.
virtual const faceList & faces() const =0
The faces used for the surface.
virtual const pointField & points() const =0
The points used for the surface.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
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 outputting to a form usable for the timeVaryingMapped boundary condition....
boundaryDataWriter()
Default construct.
virtual fileName write()
Write surface geometry to file.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeName(Type)
Define the typeName.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
messageStream Info
Information stream (stdout output on master, null elsewhere)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
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?
Convenience macros for instantiating surfaceWriter methods.
#define defineSurfaceWriterWriteFields(ThisClass)