Go to the documentation of this file.
40 namespace surfaceWriters
56 for (
direction cmpt=0; cmpt < ncmpt; ++cmpt)
93 open(surf, outputPath, parallel);
108 open(
points, faces, outputPath, parallel);
121 if (useTimeDir() && !
timeName().empty())
124 outputFile = outputPath_.
path() /
timeName() / outputPath_.name();
126 outputFile.
ext(
"inp");
130 Info<<
"Writing geometry to " << outputFile <<
endl;
146 ).
write(outputFile,
"inp");
159 const word& fieldName,
174 if (useTimeDir() && !
timeName().empty())
181 outputFile /= fieldName +
'_' + outputPath_.name();
182 outputFile.
ext(
"usr");
186 Info<<
"Writing field " << fieldName <<
" to " << outputFile <<
endl;
195 const auto&
values = tfield();
label ListType::const_reference val
virtual fileName write()
Write surface geometry to file.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling words, derived from Foam::string.
Base class for surface writers.
A class for handling file names.
static std::string path(const std::string &str)
Return directory path name (part before last /)
A class for managing temporary objects.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
virtual const faceList & faces() const =0
The faces used for the surface.
Abstract definition of a meshed surface defined by faces and points.
defineTypeName(boundaryDataWriter)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Convenience macros for instantiating surfaceWriter methods.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
messageStream Info
Information stream (uses stdout - output is on the master only)
virtual const pointField & points() const =0
The points used for the surface.
static void writeData(Ostream &os, const Type &val)
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.
word ext() const
Return file name extension (part after last .)
starcdWriter()
Construct null.
Output to file stream, using an OSstream.
static bool master(const label communicator=0)
Am I the master process.
addToRunTimeSelectionTable(surfaceWriter, boundaryDataWriter, word)
Traits class for primitives.
A surfaceWriter for STARCD files.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineSurfaceWriterWriteFields(Foam::surfaceWriters::starcdWriter)
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?