Read/write the lines from PROSTAR vrt/cel files. More...
#include <STARCDedgeFormat.H>


Public Member Functions | |
| STARCDedgeFormat (const fileName &filename) | |
| Construct from file name. | |
| virtual | ~STARCDedgeFormat ()=default |
| Destructor. | |
| virtual bool | read (const fileName &name) override |
| Read from file. | |
| virtual void | write (const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const override |
| Write to file. | |
| virtual void | write (const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const override |
| Write to file. | |
| Public Member Functions inherited from edgeMesh | |
| edgeMesh (const faMesh &mesh) | |
| Construct finite-area edge mesh faMesh reference. | |
| label | size () const noexcept |
| The geometric (internal) size - number of internal edges. | |
| const edgeVectorField & | C () const |
| Field of edge centres. | |
| TypeName ("edgeMesh") | |
| Runtime type information. | |
| edgeMesh () | |
| Default construct. | |
| edgeMesh (const edgeMesh &em) | |
| Copy construct. | |
| edgeMesh (edgeMesh &&em) | |
| Move construct. | |
| edgeMesh (const pointField &points, const edgeList &edges) | |
| Copy construct from components. | |
| edgeMesh (pointField &&pointLst, edgeList &&edgeLst) | |
| Move construct from components. | |
| edgeMesh (const fileName &name) | |
| Construct from file name (uses extension to determine type). | |
| edgeMesh (const fileName &name, const word &fileType) | |
| Construct from file name with specified type. | |
| declareRunTimeSelectionTable (autoPtr, edgeMesh, fileExtension,(const fileName &name),(name)) | |
| virtual | ~edgeMesh ()=default |
| Destructor. | |
| declareMemberFunctionSelectionTable (void, edgeMesh, write, fileExtension,(const fileName &name, const edgeMesh &mesh, IOstreamOption streamOpt, const dictionary &options),(name, mesh, streamOpt, options)) | |
| void | transfer (edgeMesh &mesh) |
| Transfer the contents of the argument and annul the argument. | |
| bool | read (const fileName &name, const word &fileType) |
| Read from file. Chooses reader based on explicit extension. | |
| const pointField & | points () const noexcept |
| Return points. | |
| const edgeList & | edges () const noexcept |
| Return edges. | |
| const labelListList & | pointEdges () const |
| Return edges. | |
| label | regions (labelList &edgeRegion) const |
| Find connected regions. Set region number per edge. | |
| virtual void | clear () |
| Clear all storage. | |
| virtual void | scalePoints (const scalar scaleFactor) |
| Scale points. A non-positive factor is ignored. | |
| virtual void | mergePoints (const scalar mergeDist) |
| Geometric merge points (points within mergeDist) prior to. | |
| virtual void | mergeEdges () |
| Merge duplicate edges and eliminate unused points. | |
| virtual void | writeStats (Ostream &) const |
| void | operator= (const edgeMesh &rhs) |
| Copy assignment. | |
| void | operator= (edgeMesh &&rhs) |
| Move assignment. | |
| Public Member Functions inherited from GeoMesh< faMesh > | |
| GeoMesh (const faMesh &mesh) | |
| Construct from mesh reference. | |
| bool | hasDb () const |
| Return true if thisDb() is a valid DB - here = false. | |
| const objectRegistry & | thisDb () const |
| Return the object registry. | |
| const faMesh & | operator() () const |
| Return reference to the underlying mesh. | |
| Public Member Functions inherited from edgeMeshFormatsCore | |
| edgeMeshFormatsCore ()=default | |
| Default construct. | |
| virtual | ~edgeMeshFormatsCore ()=default |
| Destructor. | |
Static Public Member Functions | |
| static autoPtr< edgeMesh > | New (const fileName &name) |
| Read file and return edgeMesh. | |
| static void | write (const fileName &filename, const edgeMesh &mesh, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) |
| Write edge mesh to file in STARCD format. | |
| Static Public Member Functions inherited from edgeMesh | |
| static label | size (const faMesh &mesh) noexcept |
| The geometric (internal) size - number of internal edges. | |
| static label | boundary_size (const faMesh &mesh) noexcept |
| The geometric boundary size - number of boundary edges. | |
| static wordHashSet | readTypes () |
| Summary of supported read file types. | |
| static wordHashSet | writeTypes () |
| Summary of supported write file types. | |
| static bool | canReadType (const word &fileType, bool verbose=false) |
| Can we read this file format? | |
| static bool | canWriteType (const word &fileType, bool verbose=false) |
| Can we write this file format type? | |
| static bool | canRead (const fileName &name, bool verbose=false) |
| Can we read this file format? | |
| static autoPtr< edgeMesh > | New (const fileName &name, const word &fileType) |
| Read construct from filename with given format. | |
| static autoPtr< edgeMesh > | New (const fileName &name) |
| Select constructed from filename (implicit extension). | |
| static void | write (const fileName &name, const edgeMesh &mesh, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) |
| Write to file (format implicit in the extension). | |
| static void | write (const fileName &name, const word &fileType, const edgeMesh &mesh, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) |
| Write to file, with given format. | |
| Static Public Member Functions inherited from edgeMeshFormatsCore | |
| static bool | checkSupport (const wordHashSet &available, const word &fileType, const bool verbose=false, const char *functionName=nullptr) |
| Verbose checking of fileType in the list of available types. | |
Static Protected Member Functions | |
| static void | writeCase (Ostream &os, const pointField &pointLst, const label nEdges) |
| Static Protected Member Functions inherited from edgeMeshFormatsCore | |
| static string | getLineNoComment (ISstream &is, const char comment='#') |
| Read non-comment line. | |
| Static Protected Member Functions inherited from STARCDCore | |
| static bool | readHeader (IFstream &is, const enum fileHeader header) |
| Read header and check signature PROSTAR_(CELL|VERTEX|BOUNDARY). | |
| static void | writeHeader (Ostream &os, const enum fileHeader header) |
| Write header for fileType (CELL|VERTEX|BOUNDARY). | |
| static fileName | starFileName (const fileName &baseName, const enum fileExt ext) |
| Resolve base file-name for the given file-type. | |
| static void | removeFiles (const fileName &baseName) |
| Remove existing PROSTAR files for the given base file-name. | |
| static label | readPoints (IFstream &is, List< point > &points, List< label > &ids) |
| Read points from a (.vrt) file, return the max prostar id used. | |
| static void | writePoints (Ostream &os, const UList< point > &points, const scalar scaleFactor=1.0) |
| Write header and points to (.vrt) file, optionally with scaling. | |
Additional Inherited Members | |
| Public Types inherited from GeoMesh< faMesh > | |
| typedef faMesh | Mesh |
| typedef faMesh::BoundaryMesh | BoundaryMesh |
| Static Public Attributes inherited from edgeMeshFormatsCore | |
| static word | nativeExt |
| The file extension corresponding to 'native' edge format. | |
| Protected Types inherited from STARCDCore | |
| enum | fileHeader { HEADER_CEL , HEADER_VRT , HEADER_BND } |
| Enumeration defining the file headers. More... | |
| enum | fileExt { CEL_FILE , VRT_FILE , BND_FILE , INP_FILE } |
| Enumeration defining the file extensions. More... | |
| enum | matlType { starcdFluidType = 1 , starcdSolidType = 2 , starcdBaffleType = 3 , starcdShellType = 4 , starcdLineType = 5 , starcdPointType = 6 } |
| Basic material type for STARCD/PROSTAR files. More... | |
| enum | shapeType { starcdPoint = 1 , starcdLine = 2 , starcdShell = 3 , starcdHex = 11 , starcdPrism = 12 , starcdTet = 13 , starcdPyr = 14 , starcdPoly = 255 } |
| Shape-Type for STARCD/PROSTAR files. More... | |
| Protected Member Functions inherited from edgeMesh | |
| pointField & | storedPoints () noexcept |
| Non-const access to global points. | |
| edgeList & | storedEdges () noexcept |
| Non-const access to the edges. | |
| Protected Member Functions inherited from STARCDCore | |
| STARCDCore ()=default | |
| Construct null. | |
| Protected Attributes inherited from GeoMesh< faMesh > | |
| const faMesh & | mesh_ |
| Reference to Mesh. | |
| Static Protected Attributes inherited from STARCDCore | |
| static const Map< FixedList< int, 6 > > | starToFoamFaceAddr |
| Face addressing from PROSTAR faces to OpenFOAM faces. | |
| static const Map< FixedList< int, 6 > > | foamToStarFaceAddr |
| Face addressing from OpenFOAM faces to PROSTAR faces. | |
| static const char *const | defaultBoundaryName |
| The name for default (unassigned) boundaries. | |
| static const char *const | defaultSolidBoundaryName |
| The name we have chosen for default (unassigned) solid boundaries. | |
Read/write the lines from PROSTAR vrt/cel files.
Definition at line 59 of file STARCDedgeFormat.H.
|
explicit |
Construct from file name.
Definition at line 92 of file STARCDedgeFormat.C.
References Foam::read().

|
virtualdefault |
Destructor.
References edgeMesh::edgeMesh(), mesh, Foam::name(), and dictionary::null.

|
staticprotected |
Definition at line 58 of file STARCDedgeFormat.C.
References clock::dateTime(), Foam::nl, os(), and UList< T >::size().
Referenced by write().


Read file and return edgeMesh.
Definition at line 100 of file STARCDedgeFormat.H.
References Foam::name(), and autoPtr< T >::NewFrom().

|
static |
Write edge mesh to file in STARCD format.
Definition at line 223 of file STARCDedgeFormat.C.
References IOstreamOption::ASCII, STARCDCore::CEL_FILE, edgeMesh::edgeMesh(), IOstreamOption::format(), STARCDCore::HEADER_CEL, STARCDCore::INP_FILE, fileName::lessExt(), mesh, os(), UList< T >::size(), STARCDCore::starFileName(), STARCDCore::VRT_FILE, writeCase(), Foam::writeHeader(), and STARCDCore::writePoints().

|
overridevirtual |
Read from file.
Reimplemented from edgeMesh.
Definition at line 103 of file STARCDedgeFormat.C.
References bitSet::all(), DynamicList< T, SizeMin >::append(), STARCDCore::CEL_FILE, clear(), DynamicList< T, SizeMin >::clear(), HashTable< T, Key, Hash >::clear(), List< T >::clear(), e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), STARCDCore::HEADER_CEL, Foam::invertToMap(), token::isLabel(), fileName::lessExt(), IFstream::name(), points, pts, ISstream::read(), STARCDCore::readHeader(), STARCDCore::readPoints(), DynamicList< T, SizeMin >::reserve(), bitSet::set(), HashTable< T, Key, Hash >::set(), edgeMesh::size(), UList< T >::size(), STARCDCore::starcdLineType, STARCDCore::starFileName(), edgeMesh::storedEdges(), edgeMesh::storedPoints(), and STARCDCore::VRT_FILE.

|
inlineoverridevirtual |
Write to file.
Reimplemented from edgeMesh.
Definition at line 136 of file STARCDedgeFormat.H.
References Foam::name(), dictionary::null, and write().

|
inlineoverridevirtual |
Write to file.
Reimplemented from edgeMesh.
Definition at line 149 of file STARCDedgeFormat.H.
References Foam::name(), dictionary::null, and write().
