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,
180 surfMesh::meshSubDir,
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();
228 io.writeEndDivider(
os);
264 for (
const auto&
f : faces_)
266 nTri +=
f.nTriangles();
Various functions to operate on Lists.
A primitive field of type <T> with automated input and output.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
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 bool canWriteType(const word &fileType, bool verbose=false)
Can this file format type be written via MeshedSurfaceProxy?
static wordHashSet writeTypes()
The file format types that can be written via MeshedSurfaceProxy.
label nTriangles() const
Count number of triangles.
Output to file stream, using an OSstream.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word timeName(const scalar t, const int precision=precision_)
IOstreamOption writeStreamOption() const
The write stream option (format, compression, version)
fileName timePath() const
Return current time path.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
virtual bool write()
Write the output fields.
IOobject for a surfZoneList.
A class for handling words, derived from Foam::string.
word ext() const
Return file name extension (part after last .)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define DebugInFunction
Report an information message using Foam::Info.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Ostream & endl(Ostream &os)
Add newline and flush stream.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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)