Provide a means of reading/writing the single-file OpenFOAM extendedEdgeMesh format. More...
#include <extendedEdgeMeshFormat.H>


Public Member Functions | |
| extendedEdgeMeshFormat (const fileName &) | |
| Construct from file name. | |
| virtual | ~extendedEdgeMeshFormat ()=default |
| Destructor. | |
| virtual bool | read (const fileName &) |
| Read from file. | |
| Public Member Functions inherited from extendedEdgeMesh | |
| TypeName ("extendedEdgeMesh") | |
| Runtime type information. | |
| extendedEdgeMesh () | |
| Default construct. | |
| extendedEdgeMesh (const extendedEdgeMesh &fem) | |
| Copy construct. | |
| extendedEdgeMesh (const fileName &name) | |
| Construct from file name (uses extension to determine type). | |
| extendedEdgeMesh (const fileName &name, const word &fileType) | |
| Construct from file name with given format type. | |
| extendedEdgeMesh (Istream &is) | |
| Construct from Istream. | |
| extendedEdgeMesh (const pointField &points, const edgeList &edges) | |
| Copy construct from components. | |
| extendedEdgeMesh (pointField &&points, edgeList &&edges) | |
| Move construct from components. | |
| extendedEdgeMesh (const surfaceFeatures &sFeat, const boolList &surfBaffleRegions) | |
| Construct given a surface with selected edges,points. | |
| extendedEdgeMesh (const PrimitivePatch< faceList, pointField > &surf, const labelUList &featureEdges, const labelUList ®ionFeatureEdges, const labelUList &featurePoints) | |
| Construct from PrimitivePatch. | |
| extendedEdgeMesh (const pointField &pts, const edgeList &eds, label concaveStart, label mixedStart, label nonFeatureStart, label internalStart, label flatStart, label openStart, label multipleStart, const vectorField &normals, const List< sideVolumeType > &normalVolumeTypes, const vectorField &edgeDirections, const labelListList &normalDirections, const labelListList &edgeNormals, const labelListList &featurePointNormals, const labelListList &featurePointEdges, const labelList ®ionEdges) | |
| Construct from all components. | |
| declareRunTimeSelectionTable (autoPtr, extendedEdgeMesh, fileExtension,(const fileName &name),(name)) | |
| ~extendedEdgeMesh ()=default | |
| Destructor. | |
| void | nearestFeaturePoint (const point &sample, scalar searchDistSqr, pointIndexHit &info) const |
| Find nearest surface edge for the sample point. | |
| void | nearestFeatureEdge (const point &sample, scalar searchDistSqr, pointIndexHit &info) const |
| Find nearest surface edge for the sample point. | |
| void | nearestFeatureEdge (const pointField &samples, const scalarField &searchDistSqr, List< pointIndexHit > &info) const |
| Find nearest surface edge for each sample point. | |
| void | nearestFeatureEdgeByType (const point &sample, const scalarField &searchDistSqr, List< pointIndexHit > &info) const |
| Find the nearest point on each type of feature edge. | |
| void | allNearestFeaturePoints (const point &sample, scalar searchRadiusSqr, List< pointIndexHit > &info) const |
| Find all the feature points within searchDistSqr of sample. | |
| void | allNearestFeatureEdges (const point &sample, const scalar searchRadiusSqr, List< pointIndexHit > &info) const |
| Find all the feature edges within searchDistSqr of sample. | |
| label | convexStart () const |
| Return the index of the start of the convex feature points. | |
| label | concaveStart () const |
| Return the index of the start of the concave feature points. | |
| label | mixedStart () const |
| Return the index of the start of the mixed type feature points. | |
| label | nonFeatureStart () const |
| Return the index of the start of the non-feature points. | |
| label | externalStart () const |
| Return the index of the start of the external feature edges. | |
| label | internalStart () const |
| Return the index of the start of the internal feature edges. | |
| label | flatStart () const |
| Return the index of the start of the flat feature edges. | |
| label | openStart () const |
| Return the index of the start of the open feature edges. | |
| label | multipleStart () const |
| Return the index of the start of the multiply-connected feature. | |
| bool | featurePoint (label ptI) const |
| Return whether or not the point index is a feature point. | |
| const vectorField & | normals () const |
| Return the normals of the surfaces adjacent to the feature edges. | |
| const List< sideVolumeType > & | normalVolumeTypes () const |
| Return. | |
| const vectorField & | edgeDirections () const |
| Return the edgeDirection vectors. | |
| const labelListList & | normalDirections () const |
| vector | edgeDirection (label edgeI, label ptI) const |
| Return the direction of edgeI, pointing away from ptI. | |
| const labelListList & | edgeNormals () const |
| Return the indices of the normals that are adjacent to the. | |
| vectorField | edgeNormals (const labelList &edgeNormIs) const |
| Return the normal vectors for a given set of normal indices. | |
| vectorField | edgeNormals (label edgeI) const |
| Return the normal vectors for a given edge. | |
| const labelListList & | featurePointNormals () const |
| Return the indices of the normals that are adjacent to the. | |
| vectorField | featurePointNormals (label ptI) const |
| Return the normal vectors for a given feature point. | |
| const labelListList & | featurePointEdges () const |
| Return the edge labels for a given feature point. Edges are. | |
| const labelList & | regionEdges () const |
| Return the feature edges which are on the boundary between. | |
| pointStatus | getPointStatus (label ptI) const |
| Return the pointStatus of a specified point. | |
| edgeStatus | getEdgeStatus (label edgeI) const |
| Return the edgeStatus of a specified edge. | |
| PackedList< 2 > | edgeBaffles (label edgeI) const |
| Return the baffle faces of a specified edge. | |
| const indexedOctree< treeDataPoint > & | pointTree () const |
| Demand driven construction of octree for feature points. | |
| const indexedOctree< treeDataEdge > & | edgeTree () const |
| Demand driven construction of octree for boundary edges. | |
| const PtrList< indexedOctree< treeDataEdge > > & | edgeTreesByType () const |
| Demand driven construction of octree for boundary edges by type. | |
| void | transfer (extendedEdgeMesh &mesh) |
| Transfer the contents of the argument and annul the argument. | |
| virtual void | clear () |
| Clear all storage. | |
| void | add (const extendedEdgeMesh &fem) |
| Add extendedEdgeMesh. No filtering of duplicates. | |
| void | flipNormals () |
| Flip normals. All concave become convex, all internal external. | |
| void | autoMap (const pointField &subPoints, const edgeList &subEdges, const labelList &pointMap, const labelList &edgeMap) |
| Update with derived geometry. | |
| void | trim (const searchableSurface &surf, const volumeType volType, labelList &pointMap, labelList &edgeMap) |
| Trim to surface. Keep volType side. Return map from current back. | |
| void | setFromStatus (const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge) |
| Order according to point and edge status. | |
| bool | mergePointsAndSort (const scalar mergeDist, labelList &pointMap, labelList &edgeMap) |
| Geometric merge points. Returns true if any points merged. | |
| bool | read (const fileName &name, const word &ext) |
| Read from file. Chooses reader based on explicit extension. | |
| void | writeObj (const fileName &prefix) const |
| Write all components of the extendedEdgeMesh as obj files. | |
| virtual void | writeStats (Ostream &os) const |
| Dump some information. | |
| 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 | 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 | write (const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const |
| Write to file, choosing writer based on the file extension. | |
| virtual void | write (const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const |
| Write to file with given format type. | |
| 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. | |
Additional Inherited Members | |
| Public Types inherited from extendedEdgeMesh | |
| enum | pointStatus { CONVEX , CONCAVE , MIXED , NONFEATURE } |
| enum | edgeStatus { EXTERNAL , INTERNAL , FLAT , OPEN , MULTIPLE , NONE } |
| enum | sideVolumeType { INSIDE = 0 , OUTSIDE = 1 , BOTH = 2 , NEITHER = 3 } |
| Normals point to the outside. More... | |
| Public Types inherited from GeoMesh< faMesh > | |
| typedef faMesh | Mesh |
| typedef faMesh::BoundaryMesh | BoundaryMesh |
| Static Public Member Functions inherited from extendedEdgeMesh | |
| 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< extendedEdgeMesh > | New (const fileName &name, const word &fileType) |
| Select constructed from filename with given file format. | |
| static autoPtr< extendedEdgeMesh > | New (const fileName &name) |
| Select constructed from filename (implicit extension). | |
| static edgeStatus | classifyEdge (const List< vector > &norms, const labelList &edNorms, const vector &fC0tofC1) |
| Classify the type of feature edge. Requires face centre 0 to face. | |
| static void | sortedOrder (const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge, label &pointConcaveStart, label &pointMixedStart, label &pointNonFeatStart, label &edgeInternalStart, label &edgeFlatStart, label &edgeOpenStart, label &edgeMultipleStart) |
| Determine the ordering. | |
| 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 Public Attributes inherited from extendedEdgeMesh | |
| static const Enum< pointStatus > | pointStatusNames_ |
| static const Enum< edgeStatus > | edgeStatusNames_ |
| static const Enum< sideVolumeType > | sideVolumeTypeNames_ |
| static scalar | cosNormalAngleTol_ |
| Angular closeness tolerance for treating normals as the same. | |
| static constexpr label | nPointTypes = 4 |
| Number of possible point types (i.e. number of slices). | |
| static constexpr label | nEdgeTypes = 5 |
| Number of possible feature edge types (i.e. number of slices). | |
| Static Public Attributes inherited from edgeMeshFormatsCore | |
| static word | nativeExt |
| The file extension corresponding to 'native' edge format. | |
| Protected Member Functions inherited from extendedEdgeMesh | |
| extendedEdgeMesh (std::nullptr_t) | |
| Construct null, initializing start indices with -1. | |
| pointStatus | classifyFeaturePoint (label ptI) const |
| Classify the type of feature point. Requires valid stored member. | |
| void | cut (const searchableSurface &, labelList &pMap, labelList &eMap, labelList &pointsFromEdge, labelList &oldEdge, labelList &surfTri) |
| Cut edges with surface. Return map from cut points&edges back. | |
| void | select (const searchableSurface &surf, const volumeType volType, labelList &pMap, labelList &eMap) |
| Remove outside/inside edges. volType denotes which side to keep. | |
| template<class Patch> | |
| void | sortPointsAndEdges (const Patch &, const labelUList &featureEdges, const labelUList ®ionFeatureEdges, const labelUList &feaurePoints) |
| Protected Member Functions inherited from edgeMesh | |
| pointField & | storedPoints () noexcept |
| Non-const access to global points. | |
| edgeList & | storedEdges () noexcept |
| Non-const access to the edges. | |
| Static Protected Member Functions inherited from edgeMeshFormatsCore | |
| static string | getLineNoComment (ISstream &is, const char comment='#') |
| Read non-comment line. | |
| Protected Attributes inherited from extendedEdgeMesh | |
| label | concaveStart_ |
| Index of the start of the concave feature points. | |
| label | mixedStart_ |
| Index of the start of the mixed type feature points. | |
| label | nonFeatureStart_ |
| Index of the start of the non-feature points. | |
| label | internalStart_ |
| Index of the start of the internal feature edges. | |
| label | flatStart_ |
| Index of the start of the flat feature edges. | |
| label | openStart_ |
| Index of the start of the open feature edges. | |
| label | multipleStart_ |
| Index of the start of the multiply-connected feature edges. | |
| vectorField | normals_ |
| Normals of the features, to be referred to by index by both feature. | |
| List< sideVolumeType > | normalVolumeTypes_ |
| Type per normal: which side of normal to mesh. | |
| vectorField | edgeDirections_ |
| Flat and open edges require the direction of the edge. | |
| labelListList | normalDirections_ |
| Starting directions for the edges. | |
| labelListList | edgeNormals_ |
| Indices of the normals that are adjacent to the feature edges. | |
| labelListList | featurePointNormals_ |
| Indices of the normals that are adjacent to the feature points. | |
| labelListList | featurePointEdges_ |
| Indices of feature edges attached to feature points. The edges are. | |
| labelList | regionEdges_ |
| Feature edges which are on the boundary between regions. | |
| std::unique_ptr< indexedOctree< treeDataPoint > > | pointTree_ |
| Search tree for all feature points. | |
| std::unique_ptr< indexedOctree< treeDataEdge > > | edgeTree_ |
| Search tree for all edges. | |
| PtrList< indexedOctree< treeDataEdge > > | edgeTreesByType_ |
| Individual search trees for each type of edge. | |
| Protected Attributes inherited from GeoMesh< faMesh > | |
| const faMesh & | mesh_ |
| Reference to Mesh. | |
| Static Protected Attributes inherited from extendedEdgeMesh | |
| static label | convexStart_ = 0 |
| Index of the start of the convex feature points - static as 0. | |
| static label | externalStart_ = 0 |
| Index of the start of the external feature edges - static as 0. | |
Provide a means of reading/writing the single-file OpenFOAM extendedEdgeMesh format.
Definition at line 50 of file extendedEdgeMeshFormat.H.
| extendedEdgeMeshFormat | ( | const fileName & | filename | ) |
Construct from file name.
Definition at line 29 of file extendedEdgeMeshFormat.C.
References read().

|
virtualdefault |
Destructor.
|
virtual |
Read from file.
Reimplemented from extendedEdgeMesh.
Definition at line 40 of file extendedEdgeMeshFormat.C.
References clear(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), io, Time::New(), IOobjectOption::NO_READ, IOobjectOption::NO_REGISTER, and IOobjectOption::NO_WRITE.
Referenced by extendedEdgeMeshFormat().

