Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
edgeMesh Class Reference

Points connected by edges. More...

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

Public Member Functions

 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...
 
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 (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...
 
void mergePoints (const scalar mergeDist)
 Merge common points (points within mergeDist) More...
 
void mergeEdges ()
 Merge similar 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 &)
 
- Public Member Functions inherited from edgeMeshFormatsCore
 edgeMeshFormatsCore ()
 Construct null. More...
 
virtual ~edgeMeshFormatsCore ()
 Destructor. More...
 

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)
 

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

Construct null.

Definition at line 123 of file edgeMesh.C.

Referenced by edgeMesh::edgeMesh().

Here is the caller graph for this function:

edgeMesh ( const pointField points,
const edgeList edges 
)

Construct from components.

Definition at line 133 of file edgeMesh.C.

References edgeMesh::edgeMesh().

Here is the call graph for this function:

edgeMesh ( const Xfer< pointField > &  pointLst,
const Xfer< edgeList > &  edgeLst 
)

Construct by transferring components (points, edges).

Definition at line 146 of file edgeMesh.C.

References List< T >::transfer().

Here is the call graph for this function:

edgeMesh ( const edgeMesh em)
inline

Construct as copy.

Definition at line 28 of file edgeMeshI.H.

edgeMesh ( const fileName name)

Construct from file name (uses extension to determine type)

Definition at line 46 of file edgeMeshIO.C.

References edgeMesh::read().

Here is the call graph for this function:

edgeMesh ( const fileName name,
const word ext 
)

Construct from file name (uses extension to determine type)

Definition at line 33 of file edgeMeshIO.C.

References Foam::read().

Here is the call graph for this function:

edgeMesh ( Istream )

Construct from Istream.

~edgeMesh ( )
virtual

Destructor.

Definition at line 163 of file edgeMesh.C.

Member Function Documentation

Foam::pointField & storedPoints ( )
inlineprotected

Non-const access to global points.

Definition at line 61 of file edgeMeshI.H.

Referenced by OBJedgeFormat::read(), and STARCDedgeFormat::read().

Here is the caller graph for this function:

Foam::edgeList & storedEdges ( )
inlineprotected

Non-const access to the edges.

Definition at line 67 of file edgeMeshI.H.

Referenced by OBJedgeFormat::read(), and STARCDedgeFormat::read().

Here is the caller graph for this function:

TypeName ( "edgeMesh"  )

Runtime type information.

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

Can we read this file format?

Definition at line 90 of file edgeMesh.C.

References Foam::abort(), fileName::ext(), Foam::FatalError, FatalErrorIn, Foam::invertManyToMany(), fileName::lessExt(), and List< T >::size().

Referenced by edgeMesh::canWriteType().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Can we read this file format?

Definition at line 58 of file edgeMesh.C.

References edgeMesh::canWriteType().

Referenced by edgeMesh::writeTypes().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Can we write this file format type?

Definition at line 74 of file edgeMesh.C.

References edgeMesh::canRead().

Referenced by edgeMesh::canReadType().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::wordHashSet readTypes ( )
static

Definition at line 43 of file edgeMesh.C.

Foam::wordHashSet writeTypes ( )
static

Definition at line 49 of file edgeMesh.C.

References edgeMesh::canReadType().

Here is the call graph for this function:

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

Select constructed from filename (explicit extension)

Definition at line 31 of file edgeMeshNew.C.

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

Referenced by edgeMesh::New(), and edgeMesh::read().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Select constructed from filename (implicit extension)

Definition at line 56 of file edgeMeshNew.C.

References fileName::ext(), fileName::lessExt(), and edgeMesh::New().

Here is the call graph for this function:

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

Write to file.

Definition at line 87 of file edgeMeshIO.C.

References Foam::endl(), Foam::exit(), fileName::ext(), Foam::FatalError, FatalErrorIn, Foam::Info, mesh, Foam::name(), and Foam::nl.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void transfer ( edgeMesh mesh)

Transfer the contents of the argument and annul the argument.

Definition at line 200 of file edgeMesh.C.

References List< T >::transfer().

Referenced by edgeMesh::read(), and extendedEdgeMesh::transfer().

Here is the call graph for this function:

Here is the caller graph for this function:

Transfer contents to the Xfer container.

Definition at line 208 of file edgeMesh.C.

References Foam::xferMove().

Here is the call graph for this function:

bool read ( const fileName name,
const word ext 
)

Read from file. Chooses reader based on explicit extension.

Definition at line 75 of file edgeMeshIO.C.

References edgeMesh::New(), edgeMesh::transfer(), and edgeMesh::write().

Referenced by edgeMesh::edgeMesh(), and edgeMesh::read().

Here is the call graph for this function:

Here is the caller graph for this function:

bool read ( const fileName name)
virtual

Read from file. Chooses reader based on detected extension.

Reimplemented in extendedEdgeMesh, STARCDedgeFormat, edgeMeshFormat, VTKedgeFormat, OBJedgeFormat, NASedgeFormat, extendedFeatureEdgeMeshFormat, and extendedEdgeMeshFormat.

Definition at line 58 of file edgeMeshIO.C.

References fileName::ext(), fileName::lessExt(), and edgeMesh::read().

Here is the call graph for this function:

const Foam::pointField & points ( ) const
inline
const Foam::edgeList & edges ( ) const
inline
const Foam::labelListList & pointEdges ( ) const
inline

Return edges.

Definition at line 51 of file edgeMeshI.H.

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

Here is the caller graph for this function:

Foam::label regions ( labelList edgeRegion) const

Find connected regions. Set region number per edge.

Returns number of regions.

Definition at line 214 of file edgeMesh.C.

References List< T >::append(), Foam::e, forAll, edgeMesh::pointEdges(), List< T >::setSize(), List< T >::size(), and List< T >::transfer().

Here is the call graph for this function:

void clear ( )
virtual

Clear all storage.

Reimplemented in extendedEdgeMesh.

Definition at line 169 of file edgeMesh.C.

References List< T >::clear(), and edgeMesh::reset().

Referenced by extendedEdgeMesh::clear(), OBJedgeFormat::read(), and STARCDedgeFormat::read().

Here is the call graph for this function:

Here is the caller graph for this function:

void reset ( const Xfer< pointField > &  points,
const Xfer< edgeList > &  edges 
)
virtual

Reset primitive data (points, edges)

Note, optimized to avoid overwriting data (with Xfer::null)

Definition at line 178 of file edgeMesh.C.

References Foam::notNull(), and List< T >::transfer().

Referenced by extendedEdgeMesh::add(), edgeMesh::clear(), and extendedEdgeMesh::flipNormals().

Here is the call graph for this function:

Here is the caller graph for this function:

void scalePoints ( const scalar  scaleFactor)
virtual

Scale points. A non-positive factor is ignored.

Definition at line 279 of file edgeMesh.C.

void mergePoints ( const scalar  mergeDist)

Merge common points (points within mergeDist)

Definition at line 289 of file edgeMesh.C.

References Foam::e, forAll, forAllConstIter(), Foam::mergePoints(), List< T >::setSize(), List< T >::size(), List< T >::transfer(), and Vector< Cmpt >::zero.

Here is the call graph for this function:

void mergeEdges ( )

Merge similar edges.

Definition at line 358 of file edgeMesh.C.

References Foam::e, Foam::endl(), forAll, forAllConstIter(), Foam::Info, List< T >::setSize(), and List< T >::size().

Here is the call graph for this function:

void writeStats ( Ostream os) const
virtual

Reimplemented in extendedEdgeMesh.

Definition at line 123 of file edgeMeshIO.C.

References edgeMesh::edges(), Foam::endl(), Foam::indent(), Foam::nl, edgeMesh::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:

virtual void write ( const fileName name) const
inlinevirtual

Generic write routine. Chooses writer based on extension.

Reimplemented in STARCDedgeFormat, edgeMeshFormat, VTKedgeFormat, and OBJedgeFormat.

Definition at line 261 of file edgeMesh.H.

References edgeMesh::operator<<, edgeMesh::operator=(), edgeMesh::operator>>, and edgeMesh::write().

Here is the call graph for this function:

void operator= ( const edgeMesh rhs)
inline

Definition at line 75 of file edgeMeshI.H.

Referenced by edgeMesh::write().

Here is the caller graph for this function:

Friends And Related Function Documentation

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

Referenced by edgeMesh::write().

Istream& operator>> ( Istream ,
edgeMesh  
)
friend

Referenced by edgeMesh::write().


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