41namespace surfaceWriters
57 for (
direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt)
100 open(surf, outputPath, parallel);
128 if (useTimeDir() && !
timeName().empty())
131 outputFile = outputPath_.
path() /
timeName() / outputPath_.name();
133 outputFile.
ext(
"inp");
137 Info<<
"Writing geometry to " << outputFile <<
endl;
185 const word& fieldName,
200 if (useTimeDir() && !
timeName().empty())
207 outputFile /= fieldName +
'_' + outputPath_.name();
208 outputFile.
ext(
"usr");
211 tmp<Field<Type>> tfield = adjustField(fieldName, mergeField(localValues));
215 Info<<
" to " << outputFile <<
endl;
224 const auto& values = tfield();
236 const bool useOrigFaceIds =
238 elemIds.
size() == values.size()
245 for (
const Type& val : values)
248 (useOrigFaceIds ? elemIds[faceIndex] : faceIndex);
Various functions to operate on Lists.
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.
The IOstreamOption is a simple container for options an IOstream can normally have.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
static void write(const fileName &name, const MeshedSurfaceProxy &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
Write to file, select based on its extension.
Output to file stream, using an OSstream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const UList< label > & null()
Return a UList reference to a nullObject.
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.
word ext() const
Return file name extension (part after last .)
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 labelList & faceIds() const
Per-face identifier (eg, element Id)
virtual const faceList & faces() const
The faces used for the surface.
Abstract definition of a meshed surface defined by faces and points.
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 STARCD files.
starcdWriter()
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.
OBJstream os(runTime.globalPath()/outputName)
bool found(const ListType &input, const UnaryPredicate &pred, const label start=0)
Same as found_if.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeData(Ostream &os, const Type &val)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
constexpr char nl
The newline '\n' character (0x0a)
Convenience macros for instantiating surfaceWriter methods.
#define defineSurfaceWriterWriteFields(ThisClass)