39namespace surfaceWriters
81 open(surf, outputPath, parallel);
110 if (useTimeDir() && !
timeName().empty())
113 surfaceDir = outputPath_.
path() /
timeName() / outputPath_.name();
118 Info<<
"Writing geometry to " << surfaceDir <<
endl;
130 if (!
isDir(surfaceDir))
139 OFstream(surfaceDir/
"faces", streamOpt_)() << faces;
148 faceCentres[facei] = faces[facei].centre(
points);
151 OFstream(surfaceDir/
"faceCentres", streamOpt_)() << faceCentres;
164 const word& fieldName,
183 if (useTimeDir() && !
timeName().empty())
186 surfaceDir = outputPath_.
path() /
timeName() / outputPath_.name();
198 tmp<Field<Type>> tfield = adjustField(fieldName, mergeField(localValues));
202 Info<<
" to " << surfaceDir <<
endl;
214 OFstream(outputFile, streamOpt_)() << tfield();
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.
static const char *const typeName
Typename for Field.
The IOstreamOption is a simple container for options an IOstream can normally have.
Output to file stream, using an OSstream.
void size(const label n)
Older name for setAddressableSize.
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.
virtual const pointField & points() const
The points used for the surface.
virtual const faceList & faces() const
The faces used for the surface.
Abstract definition of a meshed surface defined by faces and points.
A traits class, which is primarily used for primitives.
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 OpenFOAM surfaces.
foamWriter()
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)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
#define forAll(list, i)
Loop across all elements in list.
Convenience macros for instantiating surfaceWriter methods.
#define defineSurfaceWriterWriteFields(ThisClass)