Go to the documentation of this file.
41 return wordHashSet(*writefileExtensionMemberFunctionTablePtr_);
52 return fileFormats::surfaceFormatsCore::checkSupport
94 <<
"Cannot determine format from filename" <<
nl
99 write(
name, ext, surf, streamOpt, options);
106 auto* mfuncPtr = writefileExtensionMemberFunctionTable(fileType);
111 <<
"Unknown file type " << fileType <<
nl <<
nl
112 <<
"Valid types:" <<
nl
117 mfuncPtr(
name, surf, streamOpt, options);
129 const word name(surfName.size() ? surfName : surfaceRegistry::defaultName);
137 t.
timePath()/surfaceRegistry::prefix/
name/surfMesh::meshSubDir
140 if (!
isDir(objectDir))
154 surfMesh::meshSubDir,
162 OFstream os(objectDir/io.name(), t.writeStreamOption());
168 io.writeEndDivider(
os);
180 surfMesh::meshSubDir,
188 OFstream os(objectDir/io.name(), t.writeStreamOption());
192 if (this->useFaceMap())
194 os << UIndirectList<Face>(this->surfFaces(), this->
faceMap());
198 os << this->surfFaces();
201 io.writeEndDivider(
os);
213 surfMesh::meshSubDir,
226 os << this->surfZones();
264 for (
const auto&
f : faces_)
266 nTri +=
f.nTriangles();
Defines the attributes of an object for which implicit objectRegistry management is supported,...
MeshedSurfaceProxy(const pointField &pointLst, const UList< Face > &faceLst, const UList< surfZone > &zoneLst=UList< surfZone >::null(), const labelUList &faceMap=labelUList::null(), const labelUList &faceIdLst=labelUList::null())
Construct from component references.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from Foam::string.
A class for handling file names.
A primitive field of type <T> with automated input and output.
label nTriangles() const
Count number of triangles.
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
static word timeName(const scalar t, const int precision=precision_)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word ext() const
Return file name extension (part after last .)
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.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
IOobject for a surfZoneList.
#define DebugInFunction
Report an information message using Foam::Info.
fileName timePath() const
Return current time path.
The IOstreamOption is a simple container for options an IOstream can normally have.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
const word & name() const noexcept
Return name.
static wordHashSet writeTypes()
The file format types that can be written via MeshedSurfaceProxy.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
bool writeHeader(Ostream &os) const
Write header with current type()
Various functions to operate on Lists.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
static bool canWriteType(const word &fileType, bool verbose=false)
Can this file format type be written via MeshedSurfaceProxy?
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?