38 namespace surfaceWriters
50 fileExtension_(fileExt),
62 fileExtension_(fileExt),
118 const word& writeType,
138 if (fileExtension_.empty())
146 if (useTimeDir() && !
timeName().empty())
149 outputFile = outputPath_.
path() /
timeName() / outputPath_.name();
151 outputFile.
ext(fileExtension_);
155 Info<<
"Writing geometry to " << outputFile <<
endl;
159 const meshedSurfRef& surf = adjustSurface();
168 MeshedSurfaceProxy<face>(surf.points(), surf.faces()).
write A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void open(const fileName &outputPath)
Open for output on specified path, using existing surface.
static const fileName null
An empty fileName.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual fileName write()
Write surface geometry to file.
A simple container for options an IOstream can normally have.
static std::string path(const std::string &str)
Return directory path name (part before last /)
word ext() const
Return file name extension (part after last .)
Abstract definition of a meshed surface defined by faces and points.
A surfaceWriter that writes the geometry via the MeshedSurfaceProxy, but which does not support any f...
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
proxyWriter(const word &fileExt)
Construct for a given extension.
A class for handling words, derived from Foam::string.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
Convenience macros for instantiating surfaceWriter methods.
defineTypeName(abaqusWriter)
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
messageStream Info
Information stream (stdout output on master, null elsewhere)
defineSurfaceWriterWriteFields(Foam::surfaceWriters::proxyWriter)
Base class for surface writers.
static autoPtr< surfaceWriter > TryNew(const word &writeType)
Optional select construct proxy writer.