Class containing a list of vertices. More...

#include <vertexList.hh>

Inheritance diagram for graphics::VertexList:
concepts::CellPostprocess< Real > concepts::OutputOperator

Public Types

typedef std::unordered_map< uint, VertexInfo >::const_iterator const_iterator
 
typedef std::unordered_map< uint, VertexInfo >::iterator iterator
 
enum  vtxInfo {
  COORD = 0, EDGES = 1, FACES = 2, VOLUMES = 4,
  ALL = 7
}
 Allows to chose if all information should be stored or only some parts. More...
 

Public Member Functions

VertexInfoaddVertex (uint v, concepts::Real3d coord)
 Add a new vertex. More...
 
iterator begin ()
 Beginning of the list. More...
 
const_iterator begin () const
 
iterator end ()
 End of the list. More...
 
const_iterator end () const
 
iterator find (uint k)
 Finds a vertex in the list. More...
 
const_iterator find (uint k) const
 
virtual void operator() (const concepts::Cell &cell)
 Application operator. More...
 
virtual void operator() (const concepts::Element< Real > &elm)
 Application operator. More...
 
virtual void operator() (const Element< Real > &elm)=0
 Application operator. More...
 
uint size () const
 Returns the size of the list. More...
 
VertexInfovertex (uint v)
 Looks for the vertex with the given key. More...
 
enum vtxInfo vertexInfo () const
 Returns vtxInfo_. More...
 
 VertexList (const VertexList &vl)
 Copy constructor. More...
 
 VertexList (enum vtxInfo info=ALL)
 Constructor. More...
 
virtual ~VertexList ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Attributes

std::unordered_map< uint, VertexInfovertices_
 List of vertices. More...
 
enum vtxInfo vtxInfo_
 What information about the vertices should be stored. More...
 

Detailed Description

Class containing a list of vertices.

Adding a vertex should be done in three steps:

  1. Check if the vertex already exists (with vertex)
  2. Add a new vertex if it does not yet exist (with addVertex)
  3. If needed: fill in the connectivity information for the vertex. This is done using the methods of VertexInfo.
See also
VertexInfo
Author
Philipp Frauenfelder, 2001

Definition at line 97 of file vertexList.hh.

Member Typedef Documentation

◆ const_iterator

Definition at line 101 of file vertexList.hh.

◆ iterator

typedef std::unordered_map<uint, VertexInfo>::iterator graphics::VertexList::iterator

Definition at line 99 of file vertexList.hh.

Member Enumeration Documentation

◆ vtxInfo

Allows to chose if all information should be stored or only some parts.

To generate an image of the mesh using MeshDX, only the coordinates are needed.

See also
MeshDX
Enumerator
COORD 
EDGES 
FACES 
VOLUMES 
ALL 

Definition at line 109 of file vertexList.hh.

Constructor & Destructor Documentation

◆ VertexList() [1/2]

graphics::VertexList::VertexList ( enum vtxInfo  info = ALL)
inline

Constructor.

Definition at line 113 of file vertexList.hh.

◆ VertexList() [2/2]

graphics::VertexList::VertexList ( const VertexList vl)

Copy constructor.

◆ ~VertexList()

virtual graphics::VertexList::~VertexList ( )
inlinevirtual

Definition at line 118 of file vertexList.hh.

Member Function Documentation

◆ addVertex()

VertexInfo* graphics::VertexList::addVertex ( uint  v,
concepts::Real3d  coord 
)

Add a new vertex.

Precondition
The vertex does not yet exist in the list.
Parameters
vKey of the vertex
coordCoordinates of the vertex

◆ begin() [1/2]

iterator graphics::VertexList::begin ( )
inline

Beginning of the list.

Definition at line 137 of file vertexList.hh.

◆ begin() [2/2]

const_iterator graphics::VertexList::begin ( ) const
inline

Definition at line 138 of file vertexList.hh.

◆ end() [1/2]

iterator graphics::VertexList::end ( )
inline

End of the list.

Definition at line 141 of file vertexList.hh.

◆ end() [2/2]

const_iterator graphics::VertexList::end ( ) const
inline

Definition at line 142 of file vertexList.hh.

◆ find() [1/2]

iterator graphics::VertexList::find ( uint  k)
inline

Finds a vertex in the list.

Definition at line 145 of file vertexList.hh.

◆ find() [2/2]

const_iterator graphics::VertexList::find ( uint  k) const
inline

Definition at line 146 of file vertexList.hh.

◆ info()

virtual std::ostream& graphics::VertexList::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::CellPostprocess< Real >.

◆ operator()() [1/3]

virtual void graphics::VertexList::operator() ( const concepts::Cell cell)
virtual

Application operator.

Adds the vertex of this element to the list and updates the connectivity information of the vertex.

Parameters
cellElement to be considered

Implements concepts::CellPostprocess< Real >.

◆ operator()() [2/3]

virtual void graphics::VertexList::operator() ( const concepts::Element< Real > &  elm)
virtual

Application operator.

Adds the vertex of this element to the list and updates the connectivity information of the vertex.

Parameters
elmElement to be considered

◆ operator()() [3/3]

virtual void concepts::CellPostprocess< Real >::operator() ( const Element< F > &  elm)
pure virtualinherited

Application operator.

This application operator has to be overloaded to post process a space.

Parameters
elmCurrent element

Implemented in concepts::CellEdgeIntegral< F >, and concepts::CellFaceIntegral< F >.

◆ size()

uint graphics::VertexList::size ( ) const
inline

Returns the size of the list.

Definition at line 134 of file vertexList.hh.

◆ vertex()

VertexInfo* graphics::VertexList::vertex ( uint  v)

Looks for the vertex with the given key.

Returns
A reference to the vertex, 0 if it does not yet exist
Parameters
vKey of the vertex

◆ vertexInfo()

enum vtxInfo graphics::VertexList::vertexInfo ( ) const
inline

Returns vtxInfo_.

Definition at line 160 of file vertexList.hh.

Member Data Documentation

◆ vertices_

std::unordered_map<uint, VertexInfo> graphics::VertexList::vertices_
private

List of vertices.

Definition at line 168 of file vertexList.hh.

◆ vtxInfo_

enum vtxInfo graphics::VertexList::vtxInfo_
private

What information about the vertices should be stored.

Definition at line 168 of file vertexList.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich