ViennaLS
Loading...
Searching...
No Matches
viennals::Mesh< T > Class Template Reference

This class holds an explicit mesh, which is always given in 3 dimensions. If it describes a 2D mesh, the third dimension is set to 0. Vertices, Lines, Triangles, Tetras & Hexas are supported as geometric elements. More...

#include <lsMesh.hpp>

Public Member Functions

const std::vector< Vec3D< T > > & getNodes () const
 
std::vector< Vec3D< T > > & getNodes ()
 
template<int D, typename std::enable_if< D==1, int >::type = 0>
std::vector< std::array< unsigned, D > > & getElements ()
 
template<int D, typename std::enable_if< D==2, int >::type = 0>
std::vector< std::array< unsigned, D > > & getElements ()
 
template<int D, typename std::enable_if< D==3, int >::type = 0>
std::vector< std::array< unsigned, D > > & getElements ()
 
template<int D, typename std::enable_if< D==4, int >::type = 0>
std::vector< std::array< unsigned, D > > & getElements ()
 
template<int D, typename std::enable_if< D==8, int >::type = 0>
std::vector< std::array< unsigned, D > > & getElements ()
 
PointData< T > & getPointData ()
 
const PointData< T > & getPointData () const
 
PointData< T > & getCellData ()
 
const PointData< T > & getCellData () const
 
unsigned insertNextNode (const Vec3D< T > &node)
 
unsigned insertNextVertex (const std::array< unsigned, 1 > &vertex)
 
unsigned insertNextLine (const std::array< unsigned, 2 > &line)
 
unsigned insertNextTriangle (const std::array< unsigned, 3 > &triangle)
 
unsigned insertNextTetra (const std::array< unsigned, 4 > &tetra)
 
unsigned insertNextHexa (const std::array< unsigned, 8 > &hexa)
 
unsigned insertNextElement (const std::array< unsigned, 1 > &vertex)
 
unsigned insertNextElement (const std::array< unsigned, 2 > &line)
 
unsigned insertNextElement (const std::array< unsigned, 3 > &triangle)
 
unsigned insertNextElement (const std::array< unsigned, 4 > &tetra)
 
unsigned insertNextElement (const std::array< unsigned, 8 > &hexa)
 
void removeDuplicateNodes ()
 
void append (const Mesh< T > &passedMesh)
 
void clear ()
 
void print ()
 

Public Attributes

std::vector< Vec3D< T > > nodes
 
std::vector< std::array< unsigned, 1 > > vertices
 
std::vector< std::array< unsigned, 2 > > lines
 
std::vector< std::array< unsigned, 3 > > triangles
 
std::vector< std::array< unsigned, 4 > > tetras
 
std::vector< std::array< unsigned, 8 > > hexas
 
PointData< TpointData
 
PointData< TcellData
 
Vec3D< TminimumExtent
 
Vec3D< TmaximumExtent
 

Detailed Description

template<class T = double>
class viennals::Mesh< T >

This class holds an explicit mesh, which is always given in 3 dimensions. If it describes a 2D mesh, the third dimension is set to 0. Vertices, Lines, Triangles, Tetras & Hexas are supported as geometric elements.

Member Function Documentation

◆ append()

template<class T = double>
void viennals::Mesh< T >::append ( const Mesh< T > & passedMesh)
inline

◆ clear()

template<class T = double>
void viennals::Mesh< T >::clear ( )
inline

◆ getCellData() [1/2]

template<class T = double>
PointData< T > & viennals::Mesh< T >::getCellData ( )
inline

◆ getCellData() [2/2]

template<class T = double>
const PointData< T > & viennals::Mesh< T >::getCellData ( ) const
inline

◆ getElements() [1/5]

template<class T = double>
template<int D, typename std::enable_if< D==1, int >::type = 0>
std::vector< std::array< unsigned, D > > & viennals::Mesh< T >::getElements ( )
inline

◆ getElements() [2/5]

template<class T = double>
template<int D, typename std::enable_if< D==2, int >::type = 0>
std::vector< std::array< unsigned, D > > & viennals::Mesh< T >::getElements ( )
inline

◆ getElements() [3/5]

template<class T = double>
template<int D, typename std::enable_if< D==3, int >::type = 0>
std::vector< std::array< unsigned, D > > & viennals::Mesh< T >::getElements ( )
inline

◆ getElements() [4/5]

template<class T = double>
template<int D, typename std::enable_if< D==4, int >::type = 0>
std::vector< std::array< unsigned, D > > & viennals::Mesh< T >::getElements ( )
inline

◆ getElements() [5/5]

template<class T = double>
template<int D, typename std::enable_if< D==8, int >::type = 0>
std::vector< std::array< unsigned, D > > & viennals::Mesh< T >::getElements ( )
inline

◆ getNodes() [1/2]

template<class T = double>
std::vector< Vec3D< T > > & viennals::Mesh< T >::getNodes ( )
inline

◆ getNodes() [2/2]

template<class T = double>
const std::vector< Vec3D< T > > & viennals::Mesh< T >::getNodes ( ) const
inline

◆ getPointData() [1/2]

template<class T = double>
PointData< T > & viennals::Mesh< T >::getPointData ( )
inline

◆ getPointData() [2/2]

template<class T = double>
const PointData< T > & viennals::Mesh< T >::getPointData ( ) const
inline

◆ insertNextElement() [1/5]

template<class T = double>
unsigned viennals::Mesh< T >::insertNextElement ( const std::array< unsigned, 1 > & vertex)
inline

◆ insertNextElement() [2/5]

template<class T = double>
unsigned viennals::Mesh< T >::insertNextElement ( const std::array< unsigned, 2 > & line)
inline

◆ insertNextElement() [3/5]

template<class T = double>
unsigned viennals::Mesh< T >::insertNextElement ( const std::array< unsigned, 3 > & triangle)
inline

◆ insertNextElement() [4/5]

template<class T = double>
unsigned viennals::Mesh< T >::insertNextElement ( const std::array< unsigned, 4 > & tetra)
inline

◆ insertNextElement() [5/5]

template<class T = double>
unsigned viennals::Mesh< T >::insertNextElement ( const std::array< unsigned, 8 > & hexa)
inline

◆ insertNextHexa()

template<class T = double>
unsigned viennals::Mesh< T >::insertNextHexa ( const std::array< unsigned, 8 > & hexa)
inline

◆ insertNextLine()

template<class T = double>
unsigned viennals::Mesh< T >::insertNextLine ( const std::array< unsigned, 2 > & line)
inline

◆ insertNextNode()

template<class T = double>
unsigned viennals::Mesh< T >::insertNextNode ( const Vec3D< T > & node)
inline

◆ insertNextTetra()

template<class T = double>
unsigned viennals::Mesh< T >::insertNextTetra ( const std::array< unsigned, 4 > & tetra)
inline

◆ insertNextTriangle()

template<class T = double>
unsigned viennals::Mesh< T >::insertNextTriangle ( const std::array< unsigned, 3 > & triangle)
inline

◆ insertNextVertex()

template<class T = double>
unsigned viennals::Mesh< T >::insertNextVertex ( const std::array< unsigned, 1 > & vertex)
inline

◆ print()

template<class T = double>
void viennals::Mesh< T >::print ( )
inline

◆ removeDuplicateNodes()

template<class T = double>
void viennals::Mesh< T >::removeDuplicateNodes ( )
inline

Member Data Documentation

◆ cellData

template<class T = double>
PointData<T> viennals::Mesh< T >::cellData

◆ hexas

template<class T = double>
std::vector<std::array<unsigned, 8> > viennals::Mesh< T >::hexas

◆ lines

template<class T = double>
std::vector<std::array<unsigned, 2> > viennals::Mesh< T >::lines

◆ maximumExtent

template<class T = double>
Vec3D<T> viennals::Mesh< T >::maximumExtent

◆ minimumExtent

template<class T = double>
Vec3D<T> viennals::Mesh< T >::minimumExtent

◆ nodes

template<class T = double>
std::vector<Vec3D<T> > viennals::Mesh< T >::nodes

◆ pointData

template<class T = double>
PointData<T> viennals::Mesh< T >::pointData

◆ tetras

template<class T = double>
std::vector<std::array<unsigned, 4> > viennals::Mesh< T >::tetras

◆ triangles

template<class T = double>
std::vector<std::array<unsigned, 3> > viennals::Mesh< T >::triangles

◆ vertices

template<class T = double>
std::vector<std::array<unsigned, 1> > viennals::Mesh< T >::vertices

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