extendedEdgeMesh Class Reference

Description of feature edges and points. More...

Inheritance diagram for extendedEdgeMesh:
[legend]
Collaboration diagram for extendedEdgeMesh:
[legend]

Public Types

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
 

Public Member Functions

 TypeName ("extendedEdgeMesh")
 Runtime type information. More...
 
 extendedEdgeMesh ()
 Construct null. More...
 
 extendedEdgeMesh (const extendedEdgeMesh &fem)
 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 &is)
 Construct from Istream. More...
 
 extendedEdgeMesh (const pointField &points, const edgeList &edges)
 Copy construct from components. More...
 
 extendedEdgeMesh (pointField &&points, edgeList &&edges)
 Move construct from components. 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 labelUList &featureEdges, const labelUList &regionFeatureEdges, const labelUList &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, List< pointIndexHit > &info) const
 Find nearest surface edge for each sample point. More...
 
void nearestFeatureEdgeByType (const point &sample, const scalarField &searchDistSqr, List< pointIndexHit > &info) const
 Find the nearest point on each type of feature edge. More...
 
void allNearestFeaturePoints (const point &sample, scalar searchRadiusSqr, List< pointIndexHit > &info) const
 Find all the feature points within searchDistSqr of sample. More...
 
void allNearestFeatureEdges (const point &sample, const scalar searchRadiusSqr, List< pointIndexHit > &info) const
 Find all the feature edges within searchDistSqr of sample. 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 &mesh)
 Transfer the contents of the argument and annul the argument. More...
 
virtual void clear ()
 Clear all storage. More...
 
void add (const extendedEdgeMesh &fem)
 Add extendedEdgeMesh. No filtering of duplicates. More...
 
void flipNormals ()
 Flip normals. All concave become convex, all internal external. More...
 
void autoMap (const pointField &subPoints, const edgeList &subEdges, const labelList &pointMap, const labelList &edgeMap)
 Update with derived geometry. More...
 
void trim (const searchableSurface &surf, const volumeType volType, labelList &pointMap, labelList &edgeMap)
 Trim to surface. Keep volType side. Return map from current back. More...
 
void setFromStatus (const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge)
 Order according to point and edge status. More...
 
bool mergePointsAndSort (const scalar mergeDist, labelList &pointMap, labelList &edgeMap)
 Geometric merge points. Returns true if any points merged. More...
 
bool read (const fileName &name, const word &ext)
 Read from file. Chooses reader based on explicit extension. More...
 
virtual bool read (const fileName &name)
 Read from file. Chooses reader based on detected extension. More...
 
void writeObj (const fileName &prefix) 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
 edgeMesh (const faMesh &mesh)
 
label size () const
 
const edgeVectorFieldC ()
 
 TypeName ("edgeMesh")
 Runtime type information. More...
 
 edgeMesh ()
 Construct null. More...
 
 edgeMesh (const edgeMesh &em)
 Copy construct. More...
 
 edgeMesh (edgeMesh &&em)
 Move construct. More...
 
 edgeMesh (const pointField &points, const edgeList &edges)
 Copy construct from components. More...
 
 edgeMesh (pointField &&pointLst, edgeList &&edgeLst)
 Move construct from components. More...
 
 edgeMesh (const fileName &name)
 Construct from file name (uses extension to determine type) More...
 
 edgeMesh (const fileName &name, const word &ext)
 Construct from file name (uses extension to determine type) More...
 
 declareRunTimeSelectionTable (autoPtr, edgeMesh, fileExtension,(const fileName &name),(name))
 
virtual ~edgeMesh ()=default
 Destructor. More...
 
 declareMemberFunctionSelectionTable (void, edgeMesh, write, fileExtension,(const fileName &name, const edgeMesh &mesh),(name, mesh))
 
void transfer (edgeMesh &mesh)
 Transfer the contents of the argument and annul the argument. More...
 
bool read (const fileName &name, 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 scalePoints (const scalar scaleFactor)
 Scale points. A non-positive factor is ignored. More...
 
virtual void mergePoints (const scalar mergeDist)
 Geometric merge points (points within mergeDist) prior to. More...
 
virtual void mergeEdges ()
 Merge duplicate edges and eliminate unused points. More...
 
virtual void write (const fileName &name) const
 Generic write routine. Chooses writer based on extension. More...
 
void operator= (const edgeMesh &rhs)
 Copy assignment. More...
 
void operator= (edgeMesh &&rhs)
 Move assignment. More...
 
- Public Member Functions inherited from GeoMesh< faMesh >
 GeoMesh (const faMesh &mesh)
 Construct from MESH. More...
 
bool hasDb () const
 Return true if thisDb() is a valid DB - here = false. More...
 
const objectRegistrythisDb () const
 Return the object registry. More...
 
const faMeshoperator() () const
 Return reference to polyMesh. More...
 

Static Public Member Functions

static bool canRead (const fileName &name, bool verbose=false)
 Can we read this file format? More...
 
static bool canReadType (const word &ext, bool verbose=false)
 Can we read this file format? More...
 
static bool canWriteType (const word &ext, bool verbose=false)
 Can we write this file format type? More...
 
static wordHashSet readTypes ()
 
static wordHashSet writeTypes ()
 
static autoPtr< extendedEdgeMeshNew (const fileName &name, const word &ext)
 Select constructed from filename (explicit extension) More...
 
static autoPtr< extendedEdgeMeshNew (const fileName &name)
 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 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. More...
 
- Static Public Member Functions inherited from edgeMesh
static label size (const Mesh &mesh)
 
static bool canRead (const fileName &name, bool verbose=false)
 Can we read this file format? More...
 
static bool canReadType (const word &ext, bool verbose=false)
 Can we read this file format? More...
 
static bool canWriteType (const word &ext, bool verbose=false)
 Can we write this file format type? More...
 
static wordHashSet readTypes ()
 
static wordHashSet writeTypes ()
 
static autoPtr< edgeMeshNew (const fileName &name, const word &ext)
 Select constructed from filename (explicit extension) More...
 
static autoPtr< edgeMeshNew (const fileName &name)
 Select constructed from filename (implicit extension) More...
 
static void write (const fileName &name, const edgeMesh &mesh)
 Write to file. More...
 

Static Public Attributes

static const Enum< pointStatuspointStatusNames_
 
static const Enum< edgeStatusedgeStatusNames_
 
static const Enum< sideVolumeTypesideVolumeTypeNames_
 
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...
 

Protected Member Functions

 extendedEdgeMesh (class one::minus)
 Construct null, initializing start indices with -1. More...
 
pointStatus classifyFeaturePoint (label ptI) const
 Classify the type of feature point. Requires valid stored member. More...
 
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. More...
 
void select (const searchableSurface &surf, const volumeType volType, labelList &pMap, labelList &eMap)
 Remove outside/inside edges. volType denotes which side to keep. More...
 
template<class Patch >
void sortPointsAndEdges (const Patch &, const labelUList &featureEdges, const labelUList &regionFeatureEdges, const labelUList &feaurePoints)
 
- Protected Member Functions inherited from edgeMesh
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
edgeListstoredEdges ()
 Non-const access to the edges. More...
 

Protected Attributes

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...
 
- Protected Attributes inherited from GeoMesh< faMesh >
const faMeshmesh_
 Reference to Mesh. More...
 

Static Protected Attributes

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...
 

Friends

Istreamoperator>> (Istream &is, sideVolumeType &vt)
 
Ostreamoperator<< (Ostream &os, const sideVolumeType &vt)
 
Ostreamoperator<< (Ostream &, const extendedEdgeMesh &)
 
Istreamoperator>> (Istream &, extendedEdgeMesh &)
 

Detailed Description

Description of feature edges and points.

Feature points are a sorted subset at the start of the overall points list: 0 .. concaveStart_-1 : convex points (w.r.t normals) concaveStart_ .. mixedStart_-1 : concave points mixedStart_ .. nonFeatureStart_-1 : mixed internal/external points nonFeatureStart_ .. size-1 : non-feature points

Feature edges are the edgeList of the edgeMesh and are sorted: 0 .. internalStart_-1 : external edges (convex w.r.t normals) internalStart_ .. flatStart_-1 : internal edges (concave) flatStart_ .. openStart_-1 : flat edges (neither concave or convex) can arise from region interfaces on flat surfaces openStart_ .. multipleStart_-1 : open edges (e.g. from baffle surfaces) multipleStart_ .. size-1 : multiply connected edges

The edge direction and feature edge and feature point adjacent normals are stored.

Source files

Definition at line 86 of file extendedEdgeMesh.H.

Member Enumeration Documentation

◆ pointStatus

Enumerator
CONVEX 

Fully convex point (w.r.t normals)

CONCAVE 

Fully concave point.

MIXED 

A point surrounded by both convex and concave edges.

NONFEATURE 

Not a feature point.

Definition at line 95 of file extendedEdgeMesh.H.

◆ edgeStatus

enum edgeStatus
Enumerator
EXTERNAL 

"Convex" edge

INTERNAL 

"Concave" edge

FLAT 

Neither concave or convex, on a flat surface.

OPEN 

Only connected to a single face.

MULTIPLE 

Multiply connected (connected to more than two faces)

NONE 

Unclassified (consistency with surfaceFeatures)

Definition at line 105 of file extendedEdgeMesh.H.

◆ sideVolumeType

Normals point to the outside.

Enumerator
INSIDE 

mesh inside

OUTSIDE 

mesh outside

BOTH 

e.g. a baffle

NEITHER 

not sure when this may be used

Definition at line 118 of file extendedEdgeMesh.H.

Constructor & Destructor Documentation

◆ extendedEdgeMesh() [1/11]

extendedEdgeMesh ( class one::minus  )
explicitprotected

Construct null, initializing start indices with -1.

Definition at line 405 of file extendedEdgeMesh.C.

◆ extendedEdgeMesh() [2/11]

Construct null.

Definition at line 381 of file extendedEdgeMesh.C.

◆ extendedEdgeMesh() [3/11]

extendedEdgeMesh ( const extendedEdgeMesh fem)
explicit

Construct as copy.

Definition at line 429 of file extendedEdgeMesh.C.

◆ extendedEdgeMesh() [4/11]

extendedEdgeMesh ( const fileName name)

Construct from file name (uses extension to determine type)

Definition at line 621 of file extendedEdgeMesh.C.

References Foam::name(), and extendedEdgeMesh::read().

Here is the call graph for this function:

◆ extendedEdgeMesh() [5/11]

extendedEdgeMesh ( const fileName name,
const word ext 
)

Construct from file name (uses extension to determine type)

Definition at line 610 of file extendedEdgeMesh.C.

References Foam::name(), and Foam::read().

Here is the call graph for this function:

◆ extendedEdgeMesh() [6/11]

Construct from Istream.

Definition at line 453 of file extendedEdgeMesh.C.

◆ extendedEdgeMesh() [7/11]

extendedEdgeMesh ( const pointField points,
const edgeList edges 
)

Copy construct from components.

Definition at line 460 of file extendedEdgeMesh.C.

References points.

◆ extendedEdgeMesh() [8/11]

extendedEdgeMesh ( pointField &&  points,
edgeList &&  edges 
)

Move construct from components.

Definition at line 473 of file extendedEdgeMesh.C.

References points, and extendedEdgeMesh::transfer().

Here is the call graph for this function:

◆ extendedEdgeMesh() [9/11]

extendedEdgeMesh ( const surfaceFeatures sFeat,
const boolList surfBaffleRegions 
)

Construct given a surface with selected edges,points.

(surfaceFeatures) Extracts, classifies and reorders the data from surfaceFeatures.

Definition at line 486 of file extendedEdgeMesh.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), Foam::faceMap(), surfaceFeatures::featureEdges(), surfaceFeatures::featurePoints(), forAll, Foam::identity(), surfaceFeatures::nRegionEdges(), List< T >::setSize(), and surfaceFeatures::surface().

Here is the call graph for this function:

◆ extendedEdgeMesh() [10/11]

extendedEdgeMesh ( const PrimitivePatch< face, List, pointField, point > &  surf,
const labelUList featureEdges,
const labelUList regionFeatureEdges,
const labelUList featurePoints 
)

Construct from PrimitivePatch.

Definition at line 547 of file extendedEdgeMesh.C.

◆ extendedEdgeMesh() [11/11]

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.

Definition at line 567 of file extendedEdgeMesh.C.

◆ ~extendedEdgeMesh()

Destructor.

Definition at line 631 of file extendedEdgeMesh.C.

Member Function Documentation

◆ TypeName()

TypeName ( "extendedEdgeMesh"  )

Runtime type information.

◆ classifyFeaturePoint()

Foam::extendedEdgeMesh::pointStatus classifyFeaturePoint ( label  ptI) const
protected

Classify the type of feature point. Requires valid stored member.

data for edges and normals.

Definition at line 156 of file extendedEdgeMesh.C.

References forAll.

◆ cut()

void cut ( const searchableSurface surf,
labelList pMap,
labelList eMap,
labelList pointsFromEdge,
labelList oldEdge,
labelList surfTri 
)
protected

Cut edges with surface. Return map from cut points&edges back.

to original

Definition at line 200 of file extendedEdgeMesh.C.

References Foam::DelaunayMeshTools::allPoints(), DynamicField< T, SizeMin >::append(), DynamicList< T, SizeMin >::append(), DynamicField< T, SizeMin >::capacity(), DynamicList< T, SizeMin >::capacity(), Foam::constant::electromagnetic::e, stdFoam::end(), searchableSurface::findLineAll(), forAll, Foam::identity(), points, DynamicField< T, SizeMin >::setCapacity(), DynamicList< T, SizeMin >::setCapacity(), Foam::start, and List< T >::transfer().

Here is the call graph for this function:

◆ select()

void select ( const searchableSurface surf,
const volumeType  volType,
labelList pMap,
labelList eMap 
)
protected

Remove outside/inside edges. volType denotes which side to keep.

Definition at line 302 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, forAll, searchableSurface::getVolumeType(), Foam::identity(), volumeType::INSIDE, Foam::labelMax, volumeType::OUTSIDE, points, and List< T >::setSize().

Here is the call graph for this function:

◆ sortPointsAndEdges()

void sortPointsAndEdges ( const Patch &  surf,
const labelUList featureEdges,
const labelUList regionFeatureEdges,
const labelUList feaurePoints 
)
protected

◆ canRead()

bool canRead ( const fileName name,
bool  verbose = false 
)
static

Can we read this file format?

Definition at line 141 of file extendedEdgeMesh.C.

References word::ext(), word::lessExt(), and Foam::name().

Here is the call graph for this function:

◆ canReadType()

bool canReadType ( const word ext,
bool  verbose = false 
)
static

Can we read this file format?

Definition at line 117 of file extendedEdgeMesh.C.

◆ canWriteType()

bool canWriteType ( const word ext,
bool  verbose = false 
)
static

Can we write this file format type?

Definition at line 129 of file extendedEdgeMesh.C.

◆ readTypes()

Foam::wordHashSet readTypes ( )
static

Definition at line 103 of file extendedEdgeMesh.C.

◆ writeTypes()

Foam::wordHashSet writeTypes ( )
static

Definition at line 109 of file extendedEdgeMesh.C.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
extendedEdgeMesh  ,
fileExtension  ,
(const fileName &name ,
(name  
)

◆ New() [1/2]

Foam::autoPtr< Foam::extendedEdgeMesh > New ( const fileName name,
const word ext 
)
static

Select constructed from filename (explicit extension)

Definition at line 42 of file extendedEdgeMeshNew.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::name(), and Foam::nl.

Here is the call graph for this function:

◆ New() [2/2]

Foam::autoPtr< Foam::extendedEdgeMesh > New ( const fileName name)
static

Select constructed from filename (implicit extension)

Definition at line 64 of file extendedEdgeMeshNew.C.

References word::ext(), word::lessExt(), Foam::name(), and Foam::New().

Here is the call graph for this function:

◆ nearestFeaturePoint()

void nearestFeaturePoint ( const point sample,
scalar  searchDistSqr,
pointIndexHit info 
) const

Find nearest surface edge for the sample point.

Definition at line 664 of file extendedEdgeMesh.C.

◆ nearestFeatureEdge() [1/2]

void nearestFeatureEdge ( const point sample,
scalar  searchDistSqr,
pointIndexHit info 
) const

Find nearest surface edge for the sample point.

Definition at line 679 of file extendedEdgeMesh.C.

◆ nearestFeatureEdge() [2/2]

void nearestFeatureEdge ( const pointField samples,
const scalarField searchDistSqr,
List< pointIndexHit > &  info 
) const

Find nearest surface edge for each sample point.

Definition at line 694 of file extendedEdgeMesh.C.

References forAll, samples(), and List< T >::setSize().

Here is the call graph for this function:

◆ nearestFeatureEdgeByType()

void nearestFeatureEdgeByType ( const point sample,
const scalarField searchDistSqr,
List< pointIndexHit > &  info 
) const

Find the nearest point on each type of feature edge.

Definition at line 715 of file extendedEdgeMesh.C.

References forAll, and List< T >::setSize().

Here is the call graph for this function:

◆ allNearestFeaturePoints()

void allNearestFeaturePoints ( const point sample,
scalar  searchRadiusSqr,
List< pointIndexHit > &  info 
) const

Find all the feature points within searchDistSqr of sample.

Definition at line 751 of file extendedEdgeMesh.C.

References forAll, points, and List< T >::transfer().

Referenced by Foam::edgeMeshTools::featureProximity().

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

◆ allNearestFeatureEdges()

void allNearestFeatureEdges ( const point sample,
const scalar  searchRadiusSqr,
List< pointIndexHit > &  info 
) const

Find all the feature edges within searchDistSqr of sample.

Definition at line 782 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, forAll, PointHit< Point >::hit(), points, PointHit< Point >::rawPoint(), List< T >::setSize(), and List< T >::transfer().

Referenced by Foam::edgeMeshTools::featureProximity().

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

◆ convexStart()

Foam::label convexStart ( ) const
inline

Return the index of the start of the convex feature points.

Definition at line 30 of file extendedEdgeMeshI.H.

References extendedEdgeMesh::convexStart_.

◆ concaveStart()

Foam::label concaveStart ( ) const
inline

Return the index of the start of the concave feature points.

Definition at line 36 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ mixedStart()

Foam::label mixedStart ( ) const
inline

Return the index of the start of the mixed type feature points.

Definition at line 42 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ nonFeatureStart()

Foam::label nonFeatureStart ( ) const
inline

Return the index of the start of the non-feature points.

Definition at line 48 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ externalStart()

Foam::label externalStart ( ) const
inline

Return the index of the start of the external feature edges.

Definition at line 54 of file extendedEdgeMeshI.H.

◆ internalStart()

Foam::label internalStart ( ) const
inline

Return the index of the start of the internal feature edges.

Definition at line 60 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ flatStart()

Foam::label flatStart ( ) const
inline

Return the index of the start of the flat feature edges.

Definition at line 66 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ openStart()

Foam::label openStart ( ) const
inline

Return the index of the start of the open feature edges.

Definition at line 72 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ multipleStart()

Foam::label multipleStart ( ) const
inline

Return the index of the start of the multiply-connected feature.

edges

Definition at line 78 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and Foam::edgeMeshTools::writeStats().

Here is the caller graph for this function:

◆ featurePoint()

bool featurePoint ( label  ptI) const
inline

Return whether or not the point index is a feature point.

Definition at line 84 of file extendedEdgeMeshI.H.

◆ normals()

const Foam::vectorField & normals ( ) const
inline

Return the normals of the surfaces adjacent to the feature edges.

and points

Definition at line 90 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add().

Here is the caller graph for this function:

◆ normalVolumeTypes()

const Foam::List< Foam::extendedEdgeMesh::sideVolumeType > & normalVolumeTypes ( ) const
inline

Return.

Definition at line 97 of file extendedEdgeMeshI.H.

◆ edgeDirections()

const Foam::vectorField & edgeDirections ( ) const
inline

Return the edgeDirection vectors.

Definition at line 103 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add().

Here is the caller graph for this function:

◆ normalDirections()

const Foam::labelListList & normalDirections ( ) const
inline

Definition at line 111 of file extendedEdgeMeshI.H.

◆ edgeDirection()

Foam::vector edgeDirection ( label  edgeI,
label  ptI 
) const
inline

Return the direction of edgeI, pointing away from ptI.

Definition at line 118 of file extendedEdgeMeshI.H.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ edgeNormals() [1/3]

const Foam::labelListList & edgeNormals ( ) const
inline

Return the indices of the normals that are adjacent to the.

feature edges

Definition at line 146 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add().

Here is the caller graph for this function:

◆ edgeNormals() [2/3]

Foam::vectorField edgeNormals ( const labelList edgeNormIs) const
inline

Return the normal vectors for a given set of normal indices.

Definition at line 154 of file extendedEdgeMeshI.H.

References forAll.

◆ edgeNormals() [3/3]

Foam::vectorField edgeNormals ( label  edgeI) const
inline

Return the normal vectors for a given edge.

Definition at line 169 of file extendedEdgeMeshI.H.

◆ featurePointNormals() [1/2]

const Foam::labelListList & featurePointNormals ( ) const
inline

Return the indices of the normals that are adjacent to the.

feature points

Definition at line 177 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add().

Here is the caller graph for this function:

◆ featurePointNormals() [2/2]

Foam::vectorField featurePointNormals ( label  ptI) const
inline

Return the normal vectors for a given feature point.

Definition at line 184 of file extendedEdgeMeshI.H.

References Foam::endl(), forAll, and WarningInFunction.

Here is the call graph for this function:

◆ featurePointEdges()

const Foam::labelListList & featurePointEdges ( ) const
inline

Return the edge labels for a given feature point. Edges are.

ordered by the faces that they share. The edge labels correspond to the entry in edges().

Definition at line 212 of file extendedEdgeMeshI.H.

◆ regionEdges()

const Foam::labelList & regionEdges ( ) const
inline

Return the feature edges which are on the boundary between.

regions

Definition at line 218 of file extendedEdgeMeshI.H.

Referenced by extendedEdgeMesh::add(), and refinementFeatures::regionEdgeTrees().

Here is the caller graph for this function:

◆ getPointStatus()

Foam::extendedEdgeMesh::pointStatus getPointStatus ( label  ptI) const
inline

Return the pointStatus of a specified point.

Definition at line 225 of file extendedEdgeMeshI.H.

◆ getEdgeStatus()

Foam::extendedEdgeMesh::edgeStatus getEdgeStatus ( label  edgeI) const
inline

Return the edgeStatus of a specified edge.

Definition at line 245 of file extendedEdgeMeshI.H.

◆ edgeBaffles()

Foam::PackedList< 2 > edgeBaffles ( label  edgeI) const
inline

Return the baffle faces of a specified edge.

Definition at line 269 of file extendedEdgeMeshI.H.

References DynamicList< T, SizeMin >::append().

Here is the call graph for this function:

◆ pointTree()

const Foam::indexedOctree< Foam::treeDataPoint > & pointTree ( ) const

Demand driven construction of octree for feature points.

Definition at line 838 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, Foam::identity(), boundBox::max(), boundBox::min(), points, and rndGen.

Here is the call graph for this function:

◆ edgeTree()

const Foam::indexedOctree< Foam::treeDataEdge > & edgeTree ( ) const

Demand driven construction of octree for boundary edges.

Definition at line 878 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, Foam::identity(), boundBox::max(), boundBox::min(), points, and rndGen.

Here is the call graph for this function:

◆ edgeTreesByType()

const Foam::PtrList< Foam::indexedOctree< Foam::treeDataEdge > > & edgeTreesByType ( ) const

Demand driven construction of octree for boundary edges by type.

Definition at line 920 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, forAll, Foam::identity(), boundBox::max(), boundBox::min(), points, and rndGen.

Here is the call graph for this function:

◆ transfer()

void transfer ( extendedEdgeMesh mesh)

Transfer the contents of the argument and annul the argument.

Definition at line 984 of file extendedEdgeMesh.C.

References objectRegistry::clear(), mesh, edgeMesh::transfer(), and HashTable< T, Key, Hash >::transfer().

Referenced by extendedEdgeMesh::extendedEdgeMesh().

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

◆ clear()

void clear ( )
virtual

Clear all storage.

Reimplemented from edgeMesh.

Definition at line 1011 of file extendedEdgeMesh.C.

References edgeMesh::clear().

Here is the call graph for this function:

◆ add()

◆ flipNormals()

void flipNormals ( )

Flip normals. All concave become convex, all internal external.

etc.

Definition at line 1305 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, forAll, Foam::identity(), newPointi, points, Field< Type >::rmap(), and edgeMesh::transfer().

Here is the call graph for this function:

◆ autoMap()

void autoMap ( const pointField subPoints,
const edgeList subEdges,
const labelList pointMap,
const labelList edgeMap 
)

Update with derived geometry.

Definition at line 1417 of file extendedEdgeMesh.C.

References DynamicList< T, SizeMin >::append(), forAll, bitSet::set(), List< T >::setSize(), bitSet::test(), and List< T >::transfer().

Here is the call graph for this function:

◆ trim()

void trim ( const searchableSurface surf,
const volumeType  volType,
labelList pointMap,
labelList edgeMap 
)

Trim to surface. Keep volType side. Return map from current back.

to original points (-1 for newly introduced points), edges

Definition at line 1657 of file extendedEdgeMesh.C.

References forAll, and points.

◆ setFromStatus()

void setFromStatus ( const List< extendedEdgeMesh::pointStatus > &  pointStat,
const List< extendedEdgeMesh::edgeStatus > &  edgeStat,
labelList sortedToOriginalPoint,
labelList sortedToOriginalEdge 
)

Order according to point and edge status.

Definition at line 1740 of file extendedEdgeMesh.C.

References forAll, Foam::inplaceRenumber(), points, and Foam::sortedOrder().

Here is the call graph for this function:

◆ mergePointsAndSort()

bool mergePointsAndSort ( const scalar  mergeDist,
labelList pointMap,
labelList edgeMap 
)

Geometric merge points. Returns true if any points merged.

Return maps from new back to original points/edges.

Definition at line 1808 of file extendedEdgeMesh.C.

References forAll, Foam::identity(), Foam::mergePoints(), nPoints, points, List< T >::setSize(), and Foam::Zero.

Here is the call graph for this function:

◆ read() [1/2]

bool read ( const fileName name,
const word ext 
)

Read from file. Chooses reader based on explicit extension.

Definition at line 652 of file extendedEdgeMesh.C.

References Foam::name(), and Foam::New().

Referenced by extendedEdgeMesh::extendedEdgeMesh().

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

◆ read() [2/2]

bool read ( const fileName name)
virtual

Read from file. Chooses reader based on detected extension.

Reimplemented from edgeMesh.

Reimplemented in extendedEdgeMeshFormat.

Definition at line 637 of file extendedEdgeMesh.C.

References word::ext(), fileName::ext(), word::lessExt(), Foam::name(), and Foam::read().

Here is the call graph for this function:

◆ writeObj()

void writeObj ( const fileName prefix) const

Write all components of the extendedEdgeMesh as obj files.

Definition at line 1896 of file extendedEdgeMesh.C.

References Foam::constant::electromagnetic::e, Foam::endl(), forAll, Foam::Info, OFstream::name(), Foam::nl, points, OBJstream::write(), and edgeMesh::write().

Here is the call graph for this function:

◆ writeStats()

void writeStats ( Ostream os) const
virtual

Dump some information.

Reimplemented from edgeMesh.

Definition at line 2051 of file extendedEdgeMesh.C.

References Foam::decrIndent(), Foam::incrIndent(), Foam::indent(), Foam::nl, points, Foam::setw(), and edgeMesh::writeStats().

Here is the call graph for this function:

◆ classifyEdge()

Foam::extendedEdgeMesh::edgeStatus classifyEdge ( const List< vector > &  norms,
const labelList edNorms,
const vector fC0tofC1 
)
static

Classify the type of feature edge. Requires face centre 0 to face.

centre 1 vector to distinguish internal from external

Definition at line 2103 of file extendedEdgeMesh.C.

◆ sortedOrder()

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 
)
static

Determine the ordering.

Definition at line 2144 of file extendedEdgeMesh.C.

References extendedEdgeMesh::CONCAVE, extendedEdgeMesh::CONVEX, Foam::exit(), extendedEdgeMesh::EXTERNAL, Foam::FatalError, FatalErrorInFunction, extendedEdgeMesh::FLAT, forAll, extendedEdgeMesh::INTERNAL, extendedEdgeMesh::MIXED, extendedEdgeMesh::MULTIPLE, extendedEdgeMesh::NONE, extendedEdgeMesh::NONFEATURE, extendedEdgeMesh::OPEN, and List< T >::setSize().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>> [1/2]

Istream& operator>> ( Istream is,
sideVolumeType vt 
)
friend

◆ operator<< [1/2]

Ostream& operator<< ( Ostream os,
const sideVolumeType vt 
)
friend

◆ operator<< [2/2]

Ostream& operator<< ( Ostream ,
const extendedEdgeMesh  
)
friend

◆ operator>> [2/2]

Istream& operator>> ( Istream ,
extendedEdgeMesh  
)
friend

Member Data Documentation

◆ pointStatusNames_

const Foam::Enum< Foam::extendedEdgeMesh::pointStatus > pointStatusNames_
static

Definition at line 103 of file extendedEdgeMesh.H.

◆ edgeStatusNames_

const Foam::Enum< Foam::extendedEdgeMesh::edgeStatus > edgeStatusNames_
static

Definition at line 115 of file extendedEdgeMesh.H.

◆ sideVolumeTypeNames_

const Foam::Enum< Foam::extendedEdgeMesh::sideVolumeType > sideVolumeTypeNames_
static

◆ cosNormalAngleTol_

Foam::scalar cosNormalAngleTol_
static
Initial value:

Angular closeness tolerance for treating normals as the same.

Definition at line 129 of file extendedEdgeMesh.H.

◆ convexStart_

Foam::label convexStart_ = 0
staticprotected

Index of the start of the convex feature points - static as 0.

Definition at line 137 of file extendedEdgeMesh.H.

Referenced by extendedEdgeMesh::convexStart().

◆ externalStart_

Foam::label externalStart_ = 0
staticprotected

Index of the start of the external feature edges - static as 0.

Definition at line 140 of file extendedEdgeMesh.H.

◆ concaveStart_

label concaveStart_
protected

Index of the start of the concave feature points.

Definition at line 146 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ mixedStart_

label mixedStart_
protected

Index of the start of the mixed type feature points.

Definition at line 149 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ nonFeatureStart_

label nonFeatureStart_
protected

Index of the start of the non-feature points.

Definition at line 152 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ internalStart_

label internalStart_
protected

Index of the start of the internal feature edges.

Definition at line 155 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ flatStart_

label flatStart_
protected

Index of the start of the flat feature edges.

Definition at line 158 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ openStart_

label openStart_
protected

Index of the start of the open feature edges.

Definition at line 161 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ multipleStart_

label multipleStart_
protected

Index of the start of the multiply-connected feature edges.

Definition at line 164 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ normals_

vectorField normals_
protected

Normals of the features, to be referred to by index by both feature.

points and edges, unsorted

Definition at line 168 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ normalVolumeTypes_

List<sideVolumeType> normalVolumeTypes_
protected

Type per normal: which side of normal to mesh.

Definition at line 171 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ edgeDirections_

vectorField edgeDirections_
protected

Flat and open edges require the direction of the edge.

Definition at line 174 of file extendedEdgeMesh.H.

Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh().

◆ normalDirections_

labelListList normalDirections_
protected

Starting directions for the edges.

This vector points to the half of the plane defined by the first edge normal.

Definition at line 179 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ edgeNormals_

labelListList edgeNormals_
protected

Indices of the normals that are adjacent to the feature edges.

Definition at line 182 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ featurePointNormals_

labelListList featurePointNormals_
protected

Indices of the normals that are adjacent to the feature points.

(only valid for 0..nonFeatureStart_-1)

Definition at line 186 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ featurePointEdges_

labelListList featurePointEdges_
protected

Indices of feature edges attached to feature points. The edges are.

ordered so that they can be circulated.

Definition at line 190 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ regionEdges_

labelList regionEdges_
protected

Feature edges which are on the boundary between regions.

Definition at line 193 of file extendedEdgeMesh.H.

Referenced by Foam::operator<<(), and Foam::operator>>().

◆ pointTree_

autoPtr<indexedOctree<treeDataPoint> > pointTree_
mutableprotected

Search tree for all feature points.

Definition at line 196 of file extendedEdgeMesh.H.

◆ edgeTree_

autoPtr<indexedOctree<treeDataEdge> > edgeTree_
mutableprotected

Search tree for all edges.

Definition at line 199 of file extendedEdgeMesh.H.

◆ edgeTreesByType_

PtrList<indexedOctree<treeDataEdge> > edgeTreesByType_
mutableprotected

Individual search trees for each type of edge.

Definition at line 202 of file extendedEdgeMesh.H.

◆ nPointTypes

Foam::label nPointTypes = 4
static

Number of possible point types (i.e. number of slices)

Definition at line 252 of file extendedEdgeMesh.H.

◆ nEdgeTypes

Foam::label nEdgeTypes = 5
static

Number of possible feature edge types (i.e. number of slices)

Definition at line 255 of file extendedEdgeMesh.H.


The documentation for this class was generated from the following files:
Foam::degToRad
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Definition: unitConversion.H:48
Foam::cos
dimensionedScalar cos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:265