Provide a means of reading/writing the single-file OpenFOAM edge format. More...
Public Member Functions | |
edgeMeshFormat (const fileName &) | |
Construct from file name. More... | |
virtual | ~edgeMeshFormat () |
Destructor. More... | |
virtual bool | read (const fileName &) |
Read from file. More... | |
virtual void | write (const fileName &name) const |
Write object. More... | |
Public Member Functions inherited from edgeMesh | |
TypeName ("edgeMesh") | |
Runtime type information. More... | |
edgeMesh () | |
Construct null. More... | |
edgeMesh (const pointField &, const edgeList &) | |
Construct from components. More... | |
edgeMesh (const Xfer< pointField > &, const Xfer< edgeList > &) | |
Construct by transferring components (points, edges). More... | |
edgeMesh (const edgeMesh &) | |
Construct as copy. More... | |
edgeMesh (const fileName &) | |
Construct from file name (uses extension to determine type) More... | |
edgeMesh (const fileName &, const word &ext) | |
Construct from file name (uses extension to determine type) More... | |
edgeMesh (Istream &) | |
Construct from Istream. More... | |
declareRunTimeSelectionTable (autoPtr, edgeMesh, fileExtension,(const fileName &name),(name)) | |
virtual | ~edgeMesh () |
Destructor. More... | |
declareMemberFunctionSelectionTable (void, edgeMesh, write, fileExtension,(const fileName &name, const edgeMesh &mesh),(name, mesh)) | |
void | transfer (edgeMesh &) |
Transfer the contents of the argument and annul the argument. More... | |
Xfer< edgeMesh > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | read (const fileName &, const word &ext) |
Read from file. Chooses reader based on explicit extension. More... | |
const pointField & | points () const |
Return points. More... | |
const edgeList & | edges () const |
Return edges. More... | |
const labelListList & | pointEdges () const |
Return edges. More... | |
label | regions (labelList &edgeRegion) const |
Find connected regions. Set region number per edge. More... | |
virtual void | clear () |
Clear all storage. More... | |
virtual void | reset (const Xfer< pointField > &points, const Xfer< edgeList > &edges) |
Reset primitive data (points, edges) More... | |
virtual void | scalePoints (const scalar) |
Scale points. A non-positive factor is ignored. More... | |
virtual void | mergePoints (const scalar mergeDist, labelList &) |
Merge common points (points within mergeDist). Return map from. More... | |
virtual void | mergeEdges () |
Merge duplicate edges. More... | |
virtual void | writeStats (Ostream &) const |
void | operator= (const edgeMesh &) |
Public Member Functions inherited from edgeMeshFormatsCore | |
edgeMeshFormatsCore () | |
Construct null. More... | |
virtual | ~edgeMeshFormatsCore () |
Destructor. More... | |
Static Public Member Functions | |
static autoPtr< edgeMesh > | New (const fileName &name) |
Read file and return edgeMesh. More... | |
static bool | read (Istream &, pointField &, edgeList &) |
Read edgeMesh components from stream. More... | |
static Ostream & | write (Ostream &, const pointField &, const edgeList &) |
Write edgeMesh components to stream. More... | |
static void | write (const fileName &, const edgeMesh &) |
Write edgeMesh with a mimicked IOobject header. More... | |
Static Public Member Functions inherited from edgeMesh | |
static bool | canRead (const fileName &, const bool verbose=false) |
Can we read this file format? More... | |
static bool | canReadType (const word &ext, const bool verbose=false) |
Can we read this file format? More... | |
static bool | canWriteType (const word &ext, const bool verbose=false) |
Can we write this file format type? More... | |
static wordHashSet | readTypes () |
static wordHashSet | writeTypes () |
static autoPtr< edgeMesh > | New (const fileName &, const word &ext) |
Select constructed from filename (explicit extension) More... | |
static autoPtr< edgeMesh > | New (const fileName &) |
Select constructed from filename (implicit extension) More... | |
static void | write (const fileName &, const edgeMesh &) |
Write to file. More... | |
Static Public Member Functions inherited from edgeMeshFormatsCore | |
static bool | checkSupport (const wordHashSet &available, const word &ext, const bool verbose, const word &functionName) |
Static Protected Member Functions | |
static void | writeHeader (Ostream &, const pointField &, const edgeList &) |
Write header information. More... | |
Static Protected Member Functions inherited from edgeMeshFormatsCore | |
static string | getLineNoComment (IFstream &) |
Read non-comment line. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from edgeMeshFormatsCore | |
static word | nativeExt |
The file extension corresponding to 'native' edge format. More... | |
Protected Member Functions inherited from edgeMesh | |
pointField & | storedPoints () |
Non-const access to global points. More... | |
edgeList & | storedEdges () |
Non-const access to the edges. More... | |
Provide a means of reading/writing the single-file OpenFOAM edge format.
Definition at line 55 of file edgeMeshFormat.H.
edgeMeshFormat | ( | const fileName & | filename | ) |
Construct from file name.
Definition at line 36 of file edgeMeshFormat.C.
References Foam::blockMeshTools::read(), and edgeMeshFormat::read().
|
inlinevirtual |
Destructor.
Definition at line 102 of file edgeMeshFormat.H.
References edgeMeshFormat::read(), and edgeMeshFormat::write().
|
staticprotected |
Write header information.
Read file and return edgeMesh.
Definition at line 92 of file edgeMeshFormat.H.
|
static |
Read edgeMesh components from stream.
Definition at line 105 of file edgeMeshFormat.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), and edgeMeshFormat::write().
Referenced by edgeMeshFormat::edgeMeshFormat(), Foam::operator>>(), edgeMeshFormat::read(), and edgeMeshFormat::~edgeMeshFormat().
|
static |
Write edgeMesh components to stream.
Definition at line 129 of file edgeMeshFormat.C.
References IOstream::check(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), IOstream::name(), and Foam::nl.
Referenced by Foam::operator<<(), edgeMeshFormat::read(), edgeMeshFormat::write(), and edgeMeshFormat::~edgeMeshFormat().
Write edgeMesh with a mimicked IOobject header.
Definition at line 159 of file edgeMeshFormat.C.
References IOstream::check(), edgeMesh::edges(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOobject::note(), edgeMesh::points(), Foam::blockMeshTools::write(), and IOobject::writeHeader().
|
virtual |
Read from file.
Reimplemented from edgeMesh.
Definition at line 47 of file edgeMeshFormat.C.
References clear(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fileName::name(), fileName::path(), Foam::blockMeshTools::read(), edgeMeshFormat::read(), IOobject::readHeader(), and IOobject::typeHeaderOk().
|
inlinevirtual |
Write object.
Reimplemented from edgeMesh.
Definition at line 131 of file edgeMeshFormat.H.
References edgeMeshFormat::write().