edgeMesh Class Reference

Points connected by edges. More...

Inheritance diagram for edgeMesh:
Collaboration diagram for edgeMesh:

Public Member Functions

 TypeName ("edgeMesh")
 Runtime type information. More...
 
 edgeMesh ()
 Construct null. More...
 
 edgeMesh (const pointField &, const edgeList &)
 Construct from components. More...
 
 edgeMesh (pointField &&, edgeList &&)
 Construct by transferring components (points, edges). More...
 
 edgeMesh (const edgeMesh &)
 Copy constructor. More...
 
 edgeMesh (edgeMesh &&)
 Move constructor. 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...
 
bool read (const fileName &, const word &ext)
 Read from file. Chooses reader based on explicit extension. More...
 
virtual bool read (const fileName &)
 Read from file. Chooses reader based on detected 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 clear ()
 Clear all storage. More...
 
virtual void reset (pointField &&points, edgeList &&edges)
 Reset primitive data (points, edges) More...
 
virtual void scalePoints (const scalar)
 Scale points. A non-positive factor is ignored. More...
 
virtual void mergeEdges ()
 Merge duplicate edges. More...
 
virtual void writeStats (Ostream &) const
 
virtual void write (const fileName &name) const
 Generic write routine. Chooses writer based on extension. More...
 
void operator= (const edgeMesh &)
 
void operator= (edgeMesh &&)
 

Static Public Member Functions

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

Protected Member Functions

pointFieldstoredPoints ()
 Non-const access to global points. More...
 
edgeListstoredEdges ()
 Non-const access to the edges. More...
 

Friends

Ostreamoperator<< (Ostream &, const edgeMesh &)
 
Istreamoperator>> (Istream &, edgeMesh &)
 

Additional Inherited Members

- Static Public Attributes inherited from edgeMeshFormatsCore
static word nativeExt
 The file extension corresponding to 'native' edge format. More...
 
- Static Protected Member Functions inherited from edgeMeshFormatsCore
static string getLineNoComment (IFstream &)
 Read non-comment line. More...
 

Detailed Description

Points connected by edges.

Can be read from fileName based on extension. Uses New factory method to select the reader and transfer the result.

Source files

Definition at line 69 of file edgeMesh.H.

Constructor & Destructor Documentation

◆ edgeMesh() [1/8]

edgeMesh ( )

Construct null.

Definition at line 122 of file edgeMesh.C.

Referenced by extendedEdgeMesh::sortPointsAndEdges().

Here is the caller graph for this function:

◆ edgeMesh() [2/8]

edgeMesh ( const pointField points,
const edgeList edges 
)

Construct from components.

Definition at line 131 of file edgeMesh.C.

◆ edgeMesh() [3/8]

edgeMesh ( pointField &&  pointLst,
edgeList &&  edgeLst 
)

Construct by transferring components (points, edges).

Definition at line 144 of file edgeMesh.C.

◆ edgeMesh() [4/8]

edgeMesh ( const edgeMesh em)
inline

Copy constructor.

Definition at line 42 of file edgeMeshI.H.

◆ edgeMesh() [5/8]

edgeMesh ( edgeMesh &&  em)
inline

Move constructor.

Definition at line 51 of file edgeMeshI.H.

◆ edgeMesh() [6/8]

edgeMesh ( const fileName name)

Construct from file name (uses extension to determine type)

Definition at line 46 of file edgeMeshIO.C.

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

Here is the call graph for this function:

◆ edgeMesh() [7/8]

edgeMesh ( const fileName name,
const word ext 
)

Construct from file name (uses extension to determine type)

Definition at line 32 of file edgeMeshIO.C.

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

Here is the call graph for this function:

◆ edgeMesh() [8/8]

edgeMesh ( Istream )

Construct from Istream.

◆ ~edgeMesh()

~edgeMesh ( )
virtual

Destructor.

Definition at line 159 of file edgeMesh.C.

Member Function Documentation

◆ storedPoints()

Foam::pointField & storedPoints ( )
inlineprotected

Non-const access to global points.

Definition at line 28 of file edgeMeshI.H.

◆ storedEdges()

Foam::edgeList & storedEdges ( )
inlineprotected

Non-const access to the edges.

Definition at line 34 of file edgeMeshI.H.

◆ TypeName()

TypeName ( "edgeMesh"  )

Runtime type information.

◆ canRead()

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

Can we read this file format?

Definition at line 88 of file edgeMesh.C.

References Foam::name().

Here is the call graph for this function:

◆ canReadType()

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

Can we read this file format?

Definition at line 56 of file edgeMesh.C.

◆ canWriteType()

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

Can we write this file format type?

Definition at line 72 of file edgeMesh.C.

◆ readTypes()

Foam::wordHashSet readTypes ( )
static

Definition at line 42 of file edgeMesh.C.

◆ writeTypes()

Foam::wordHashSet writeTypes ( )
static

Definition at line 48 of file edgeMesh.C.

◆ declareRunTimeSelectionTable()

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

◆ New() [1/2]

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

Select constructed from filename (explicit extension)

Definition at line 30 of file edgeMeshNew.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::edgeMesh > New ( const fileName name)
static

Select constructed from filename (implicit extension)

Definition at line 53 of file edgeMeshNew.C.

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

Here is the call graph for this function:

◆ declareMemberFunctionSelectionTable()

declareMemberFunctionSelectionTable ( void  ,
edgeMesh  ,
write  ,
fileExtension  ,
(const fileName &name, const edgeMesh &mesh)  ,
(name, mesh)   
)

◆ write() [1/2]

void write ( const fileName name,
const edgeMesh mesh 
)
static

Write to file.

Definition at line 86 of file edgeMeshIO.C.

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

Referenced by edgeMesh::write(), and extendedEdgeMesh::writeObj().

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

◆ transfer()

void transfer ( edgeMesh mesh)

Transfer the contents of the argument and annul the argument.

Definition at line 196 of file edgeMesh.C.

Referenced by extendedEdgeMesh::transfer().

Here is the caller 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 74 of file edgeMeshIO.C.

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

Referenced by edgeMesh::edgeMesh().

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 in extendedEdgeMeshFormat, extendedEdgeMesh, VTKedgeFormat, STARCDedgeFormat, OBJedgeFormat, NASedgeFormat, extendedFeatureEdgeMeshFormat, and edgeMeshFormat.

Definition at line 58 of file edgeMeshIO.C.

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

Here is the call graph for this function:

◆ points()

◆ edges()

◆ pointEdges()

const Foam::labelListList & pointEdges ( ) const
inline

Return edges.

Definition at line 74 of file edgeMeshI.H.

Referenced by searchableExtrudedCircle::findParametricNearest(), and extendedEdgeMesh::sortPointsAndEdges().

Here is the caller graph for this function:

◆ regions()

Foam::label regions ( labelList edgeRegion) const

Find connected regions. Set region number per edge.

Returns number of regions.

Definition at line 204 of file edgeMesh.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), Foam::e, forAll, List< T >::setSize(), List< T >::size(), and List< T >::transfer().

Here is the call graph for this function:

◆ clear()

void clear ( )
virtual

Clear all storage.

Reimplemented in extendedEdgeMesh.

Definition at line 165 of file edgeMesh.C.

Referenced by extendedEdgeMesh::clear().

Here is the caller graph for this function:

◆ reset()

void reset ( pointField &&  points,
edgeList &&  edges 
)
virtual

Reset primitive data (points, edges)

Note, optimised to avoid overwriting data (with null)

Definition at line 173 of file edgeMesh.C.

References Foam::notNull().

Referenced by extendedEdgeMesh::sortPointsAndEdges().

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

◆ scalePoints()

void scalePoints ( const scalar  scaleFactor)
virtual

Scale points. A non-positive factor is ignored.

Definition at line 269 of file edgeMesh.C.

◆ mergeEdges()

void mergeEdges ( )
virtual

Merge duplicate edges.

Definition at line 279 of file edgeMesh.C.

References Foam::e, Foam::endl(), forAll, forAllConstIter, Foam::Info, HashTable< T, Key, Hash >::insert(), and HashTable< T, Key, Hash >::size().

Here is the call graph for this function:

◆ writeStats()

void writeStats ( Ostream os) const
virtual

Reimplemented in extendedEdgeMesh.

Definition at line 117 of file edgeMeshIO.C.

References Foam::endl(), Foam::indent(), Foam::nl, points, and List< T >::size().

Referenced by extendedEdgeMesh::writeStats().

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

◆ write() [2/2]

virtual void write ( const fileName name) const
inlinevirtual

Generic write routine. Chooses writer based on extension.

Reimplemented in VTKedgeFormat, STARCDedgeFormat, OBJedgeFormat, and edgeMeshFormat.

Definition at line 260 of file edgeMesh.H.

References Foam::name(), and edgeMesh::write().

Here is the call graph for this function:

◆ operator=() [1/2]

void operator= ( const edgeMesh rhs)
inline

Definition at line 86 of file edgeMeshI.H.

References List< T >::clear().

Referenced by extendedEdgeMesh::sortPointsAndEdges().

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

◆ operator=() [2/2]

void operator= ( edgeMesh &&  rhs)
inline

Definition at line 94 of file edgeMeshI.H.

Friends And Related Function Documentation

◆ operator<<

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

◆ operator>>

Istream& operator>> ( Istream ,
edgeMesh  
)
friend

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