Public Member Functions | List of all members
extendedEdgeMeshFormat Class Reference

Provide a means of reading/writing the single-file OpenFOAM extendedEdgeMesh format. More...

Inheritance diagram for extendedEdgeMeshFormat:
Inheritance graph
[legend]
Collaboration diagram for extendedEdgeMeshFormat:
Collaboration graph
[legend]

Public Member Functions

 extendedEdgeMeshFormat (const fileName &)
 Construct from file name. More...
 
virtual ~extendedEdgeMeshFormat ()
 Destructor. More...
 
virtual bool read (const fileName &)
 Read from file. More...
 
- Public Member Functions inherited from extendedEdgeMesh
 TypeName ("extendedEdgeMesh")
 Runtime type information. More...
 
 extendedEdgeMesh ()
 Construct null. More...
 
 extendedEdgeMesh (const extendedEdgeMesh &)
 Construct as copy. More...
 
 extendedEdgeMesh (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 extendedEdgeMesh (const fileName &, const word &ext)
 Construct from file name (uses extension to determine type) More...
 
 extendedEdgeMesh (Istream &)
 Construct from Istream. More...
 
 extendedEdgeMesh (const Xfer< pointField > &, const Xfer< edgeList > &)
 Construct by transferring components (points, edges) More...
 
 extendedEdgeMesh (const surfaceFeatures &sFeat, const boolList &surfBaffleRegions)
 Construct given a surface with selected edges,points. More...
 
 extendedEdgeMesh (const PrimitivePatch< face, List, pointField, point > &surf, const labelList &featureEdges, const labelList &regionFeatureEdges, const labelList &featurePoints)
 Construct from PrimitivePatch. More...
 
 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 &regionEdges)
 Construct from all components. More...
 
 declareRunTimeSelectionTable (autoPtr, extendedEdgeMesh, fileExtension,(const fileName &name),(name))
 
 ~extendedEdgeMesh ()
 Destructor. More...
 
void nearestFeaturePoint (const point &sample, scalar searchDistSqr, pointIndexHit &info) const
 Find nearest surface edge for the sample point. More...
 
void nearestFeatureEdge (const point &sample, scalar searchDistSqr, pointIndexHit &info) const
 Find nearest surface edge for the sample point. More...
 
void nearestFeatureEdge (const pointField &samples, const scalarField &searchDistSqr, pointIndexHitList &info) const
 Find nearest surface edge for each sample point. More...
 
void nearestFeatureEdgeByType (const point &sample, const scalarField &searchDistSqr, pointIndexHitList &info) const
 Find the nearest point on each type of feature edge. More...
 
void allNearestFeaturePoints (const point &sample, scalar searchRadiusSqr, pointIndexHitList &info) const
 Find all the feature points within searchDistSqr of sample. More...
 
void allNearestFeatureEdges (const point &sample, const scalar searchRadiusSqr, pointIndexHitList &info) const
 Find all the feature edges within searchDistSqr of sample. More...
 
scalar minDisconnectedDist (const pointIndexHitList &hitList) const
 Return the minimum distance between disconnected edges. More...
 
label convexStart () const
 Return the index of the start of the convex feature points. More...
 
label concaveStart () const
 Return the index of the start of the concave feature points. More...
 
label mixedStart () const
 Return the index of the start of the mixed type feature points. More...
 
label nonFeatureStart () const
 Return the index of the start of the non-feature points. More...
 
label externalStart () const
 Return the index of the start of the external feature edges. More...
 
label internalStart () const
 Return the index of the start of the internal feature edges. More...
 
label flatStart () const
 Return the index of the start of the flat feature edges. More...
 
label openStart () const
 Return the index of the start of the open feature edges. More...
 
label multipleStart () const
 Return the index of the start of the multiply-connected feature. More...
 
bool featurePoint (label ptI) const
 Return whether or not the point index is a feature point. More...
 
const vectorFieldnormals () const
 Return the normals of the surfaces adjacent to the feature edges. More...
 
const List< sideVolumeType > & normalVolumeTypes () const
 Return. More...
 
const vectorFieldedgeDirections () const
 Return the edgeDirection vectors. More...
 
const labelListListnormalDirections () const
 
vector edgeDirection (label edgeI, label ptI) const
 Return the direction of edgeI, pointing away from ptI. More...
 
const labelListListedgeNormals () const
 Return the indices of the normals that are adjacent to the. More...
 
vectorField edgeNormals (const labelList &edgeNormIs) const
 Return the normal vectors for a given set of normal indices. More...
 
vectorField edgeNormals (label edgeI) const
 Return the normal vectors for a given edge. More...
 
const labelListListfeaturePointNormals () const
 Return the indices of the normals that are adjacent to the. More...
 
vectorField featurePointNormals (label ptI) const
 Return the normal vectors for a given feature point. More...
 
const labelListListfeaturePointEdges () const
 Return the edge labels for a given feature point. Edges are. More...
 
const labelListregionEdges () const
 Return the feature edges which are on the boundary between. More...
 
pointStatus getPointStatus (label ptI) const
 Return the pointStatus of a specified point. More...
 
edgeStatus getEdgeStatus (label edgeI) const
 Return the edgeStatus of a specified edge. More...
 
PackedList< 2 > edgeBaffles (label edgeI) const
 Return the baffle faces of a specified edge. More...
 
const indexedOctree< treeDataPoint > & pointTree () const
 Demand driven construction of octree for feature points. More...
 
const indexedOctree< treeDataEdge > & edgeTree () const
 Demand driven construction of octree for boundary edges. More...
 
const PtrList< indexedOctree< treeDataEdge > > & edgeTreesByType () const
 Demand driven construction of octree for boundary edges by type. More...
 
void transfer (extendedEdgeMesh &)
 Transfer the contents of the argument and annul the argument. More...
 
Xfer< extendedEdgeMeshxfer ()
 Transfer contents to the Xfer container. More...
 
virtual void clear ()
 Clear all storage. More...
 
void add (const extendedEdgeMesh &)
 Add extendedEdgeMesh. No filtering of duplicates. More...
 
void flipNormals ()
 Flip normals. All concave become convex, all internal external. More...
 
bool read (const fileName &, const word &ext)
 Read from file. Chooses reader based on explicit extension. More...
 
void writeObj (const fileName &prefix, const bool verbose=true) const
 Write all components of the extendedEdgeMesh as obj files. More...
 
virtual void writeStats (Ostream &os) const
 Dump some information. 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< edgeMeshxfer ()
 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 pointFieldpoints () const
 Return points. More...
 
const edgeListedges () const
 Return edges. More...
 
const labelListListpointEdges () const
 Return edges. More...
 
label regions (labelList &edgeRegion) const
 Find connected regions. Set region number per edge. 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 write (const fileName &name) const
 Generic write routine. Chooses writer based on extension. More...
 
void operator= (const edgeMesh &)
 
- Public Member Functions inherited from edgeMeshFormatsCore
 edgeMeshFormatsCore ()
 Construct null. More...
 
virtual ~edgeMeshFormatsCore ()
 Destructor. More...
 

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...
 
- Static Public Member Functions inherited from extendedEdgeMesh
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< extendedEdgeMeshNew (const fileName &, const word &ext)
 Select constructed from filename (explicit extension) More...
 
static autoPtr< extendedEdgeMeshNew (const fileName &)
 Select constructed from filename (implicit extension) More...
 
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. 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< edgeMeshNew (const fileName &, const word &ext)
 Select constructed from filename (explicit extension) More...
 
static autoPtr< edgeMeshNew (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 Public Attributes inherited from extendedEdgeMesh
static const Foam::NamedEnum< pointStatus, 4 > pointStatusNames_
 
static const Foam::NamedEnum< edgeStatus, 6 > edgeStatusNames_
 
static const Foam::NamedEnum< sideVolumeType, 4 > sideVolumeTypeNames_
 
static scalar cosNormalAngleTol_
 Angular closeness tolerance for treating normals as the same. More...
 
static label nPointTypes = 4
 Number of possible point types (i.e. number of slices) More...
 
static label nEdgeTypes = 5
 Number of possible feature edge types (i.e. number of slices) More...
 
- Static Public Attributes inherited from edgeMeshFormatsCore
static word nativeExt
 The file extension corresponding to 'native' edge format. More...
 
- Protected Member Functions inherited from extendedEdgeMesh
pointStatus classifyFeaturePoint (label ptI) const
 Classify the type of feature point. Requires valid stored member. More...
 
template<class Patch >
void sortPointsAndEdges (const Patch &, const labelList &featureEdges, const labelList &regionFeatureEdges, const labelList &feaurePoints)
 
- Protected Member Functions inherited from edgeMesh
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
edgeListstoredEdges ()
 Non-const access to the edges. More...
 
- Static Protected Member Functions inherited from edgeMeshFormatsCore
static string getLineNoComment (IFstream &)
 Read non-comment line. More...
 
- Protected Attributes inherited from extendedEdgeMesh
label concaveStart_
 Index of the start of the concave feature points. More...
 
label mixedStart_
 Index of the start of the mixed type feature points. More...
 
label nonFeatureStart_
 Index of the start of the non-feature points. More...
 
label internalStart_
 Index of the start of the internal feature edges. More...
 
label flatStart_
 Index of the start of the flat feature edges. More...
 
label openStart_
 Index of the start of the open feature edges. More...
 
label multipleStart_
 Index of the start of the multiply-connected feature edges. More...
 
vectorField normals_
 Normals of the features, to be referred to by index by both feature. More...
 
List< sideVolumeTypenormalVolumeTypes_
 Type per normal: which side of normal to mesh. More...
 
vectorField edgeDirections_
 Flat and open edges require the direction of the edge. More...
 
labelListList normalDirections_
 Starting directions for the edges. More...
 
labelListList edgeNormals_
 Indices of the normals that are adjacent to the feature edges. More...
 
labelListList featurePointNormals_
 Indices of the normals that are adjacent to the feature points. More...
 
labelListList featurePointEdges_
 Indices of feature edges attached to feature points. The edges are. More...
 
labelList regionEdges_
 Feature edges which are on the boundary between regions. More...
 
autoPtr< indexedOctree< treeDataPoint > > pointTree_
 Search tree for all feature points. More...
 
autoPtr< indexedOctree< treeDataEdge > > edgeTree_
 Search tree for all edges. More...
 
PtrList< indexedOctree< treeDataEdge > > edgeTreesByType_
 Individual search trees for each type of edge. More...
 
- Static Protected Attributes inherited from extendedEdgeMesh
static label convexStart_ = 0
 Index of the start of the convex feature points - static as 0. More...
 
static label externalStart_ = 0
 Index of the start of the external feature edges - static as 0. More...
 

Detailed Description

Provide a means of reading/writing the single-file OpenFOAM extendedEdgeMesh format.

Source files

Definition at line 51 of file extendedEdgeMeshFormat.H.

Constructor & Destructor Documentation

◆ extendedEdgeMeshFormat()

extendedEdgeMeshFormat ( const fileName filename)

Construct from file name.

Definition at line 34 of file extendedEdgeMeshFormat.C.

References Foam::blockMeshTools::read(), and extendedEdgeMeshFormat::read().

Here is the call graph for this function:

◆ ~extendedEdgeMeshFormat()

virtual ~extendedEdgeMeshFormat ( )
inlinevirtual

Destructor.

Definition at line 73 of file extendedEdgeMeshFormat.H.

References extendedEdgeMeshFormat::read().

Here is the call graph for this function:

Member Function Documentation

◆ read()

bool read ( const fileName filename)
virtual

Read from file.

Reimplemented from extendedEdgeMesh.

Definition at line 45 of file extendedEdgeMeshFormat.C.

References clear(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), fileName::name(), fileName::path(), IOobject::readHeader(), and IOobject::typeHeaderOk().

Referenced by extendedEdgeMeshFormat::extendedEdgeMeshFormat(), and extendedEdgeMeshFormat::~extendedEdgeMeshFormat().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: