Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
model::Simplex< dim, dim > Class Template Reference

#include <Simplex.h>

Inheritance diagram for model::Simplex< dim, dim >:
Collaboration diagram for model::Simplex< dim, dim >:

Public Types

enum  { order =dim }
enum  { nVertices =SimplexTraits<dim,order>::nVertices }
enum  { nFaces =SimplexTraits<dim,order>::nFaces }
typedef SimplexTraits< dim, order >::SimplexIDType SimplexIDType
typedef Simplex< dim, order-1 > ChildSimplexType
typedef SimplexTraits< dim, order-1 >::SimplexIDType ChildIDType
typedef Polyhedron< dim, dim > MeshRegionType
Public Types inherited from model::SimplexParent< dim, order >
typedef SimplexTraits< dim, order >::SimplexIDType SimplexIDType
typedef SimplexTraits< dim, order >::BaseArrayType BaseArrayType
typedef Simplex< dim, order-1 > ChildSimplexType
typedef SimplexTraits< dim, order-1 >::SimplexIDType ChildIDType
Public Types inherited from model::SimplexBase< dim, order >
typedef SimplexTraits< dim, order > SimplexTraitsType
typedef SimplexTraitsType::SimplexIDType SimplexIDType
using KeyType
Public Types inherited from model::SimplexChild< dim, order >
using SimplexType = typename SimplexTraits<dim, order>::SimplexType
using ParentSimplexType = typename SimplexTraits<dim, order + 1>::SimplexType
using ParentSimplexIDType = typename SimplexTraits<dim, order + 1>::SimplexIDType
using ParentContainerType = std::map<ParentSimplexIDType, std::shared_ptr<ParentSimplexType>>
using ParentLinks = std::map<ParentSimplexIDType, std::weak_ptr<ParentSimplexType>>
using SiblingsContainerType
Public Types inherited from model::SimplexParent< dim, dim >
typedef SimplexTraits< dim, order >::SimplexIDType SimplexIDType
typedef SimplexTraits< dim, order >::BaseArrayType BaseArrayType
typedef Simplex< dim, order-1 > ChildSimplexType
typedef SimplexTraits< dim, order-1 >::SimplexIDType ChildIDType
Public Types inherited from model::SimplexBase< dim, dim >
typedef SimplexTraits< dim, order > SimplexTraitsType
typedef SimplexTraitsType::SimplexIDType SimplexIDType
using KeyType

Public Member Functions

 ~Simplex ()
size_t childOrder (const ChildIDType &childID) const
std::vector< int > boundaryFaces () const
bool isBoundarySimplex () const
bool isRegionBoundarySimplex () const
Eigen::Matrix< double, dim+1, 1 > pos2bary (const Eigen::Matrix< double, dim, 1 > &P) const
void convexDelaunaynSearch (const bool &searchAllRegions, const Eigen::Matrix< double, dim, 1 > &P, std::pair< bool, const Simplex< dim, dim > * > &lastSearched, std::set< const Simplex< dim, dim > * > &searchSet) const
Eigen::Matrix< double, dim+1, 1 > faceLineIntersection (const Eigen::Matrix< double, dim+1, 1 > &bary0, const Eigen::Matrix< double, dim+1, 1 > &bary1, const int &faceID) const
std::set< size_t > regionIDs () const
std::set< const Simplex< dim, order > * > spouses () const
std::set< const Simplex< dim, order > * > boundaryNeighbors () const
std::set< const Simplex< dim, order > * > regionBoundaryNeighbors () const
Eigen::Matrix< double, dim, 1 > outNormal () const
Public Member Functions inherited from model::SimplexParent< dim, order >
 SimplexParent (SimplicialMesh< dim > *const mesh, const SimplexIDType &xID)
Eigen::Matrix< double, dim, SimplexTraits< dim, order >::nVertices > vertexPositionMatrix () const
Eigen::Matrix< double, dim+1, SimplexTraits< dim, order >::nVertices > get_b2p (SimplicialMesh< dim > *const mesh, const SimplexIDType &xID) const
Eigen::Matrix< double, dim, 1 > bary2pos (const Eigen::Matrix< double, SimplexTraits< dim, order >::nVertices, 1 > &bary) const
Eigen::Matrix< double, dim, 1 > center () const
BaseArrayType & children ()
const BaseArrayType & children () const
ChildSimplexType & child (const int &n)
const ChildSimplexType & child (const int &n) const
const std::shared_ptr< ChildSimplexType > & child (const ChildIDType &xID) const
Public Member Functions inherited from model::SimplexBase< dim, order >
 SimplexBase (SimplicialMesh< dim > *const m, const SimplexIDType &vIN)
SimplexBase & operator= (const SimplexBase &)=delete
std::array< const Simplex< dim, 0 > *, SimplexTraits< dim, order >::nVertices > vertices () const
Public Member Functions inherited from model::StaticID< SimplexBase< _dim, order > >
 StaticID ()
Public Member Functions inherited from model::SimplexChild< dim, order >
void addParent (const std::shared_ptr< ParentSimplexType > &parent)
const ParentLinks & parentLinks () const
ParentContainerType parents () const
SiblingsContainerType siblings () const
bool isBoundarySimplex () const
bool isRegionBoundarySimplex () const
bool isInRegion (const size_t &id) const
std::set< size_t > regionIDs () const
Public Member Functions inherited from model::SimplexParent< dim, dim >
 SimplexParent (SimplicialMesh< dim > *const mesh, const SimplexIDType &xID)
Eigen::Matrix< double, dim, SimplexTraits< dim, order >::nVertices > vertexPositionMatrix () const
Eigen::Matrix< double, dim+1, SimplexTraits< dim, order >::nVertices > get_b2p (SimplicialMesh< dim > *const mesh, const SimplexIDType &xID) const
Eigen::Matrix< double, dim, 1 > bary2pos (const Eigen::Matrix< double, SimplexTraits< dim, order >::nVertices, 1 > &bary) const
Eigen::Matrix< double, dim, 1 > center () const
BaseArrayType & children ()
ChildSimplexType & child (const int &n)
Public Member Functions inherited from model::SimplexBase< dim, dim >
 SimplexBase (SimplicialMesh< dim > *const m, const SimplexIDType &vIN)
SimplexBase & operator= (const SimplexBase &)=delete
std::array< const Simplex< dim, 0 > *, SimplexTraits< dim, order >::nVertices > vertices () const

Public Attributes

const std::shared_ptr< MeshRegionType > region
 Shared pointer to MeshRegioin containing *this.
const Eigen::Matrix< double, dim+1, dim+1 > p2b
 The position to barycentric-coordinate transformation matrix.
const Eigen::Matrix< double, dim, dim+1 > nda
 The column matrix of face normals.
const double vol0
Public Attributes inherited from model::SimplexParent< dim, order >
const Eigen::Matrix< double, dim+1, SimplexTraits< dim, order >::nVertices > b2p
 The barycentric-coordinate to position transformation matrix.
Public Attributes inherited from model::SimplexBase< dim, order >
SimplicialMesh< dim > *const mesh
const SimplexIDType xID
const SimplexIDType & key
Public Attributes inherited from model::StaticID< SimplexBase< _dim, order > >
const size_t sID
 The static ID of this.
Public Attributes inherited from model::SimplexParent< dim, dim >
const Eigen::Matrix< double, dim+1, SimplexTraits< dim, order >::nVertices > b2p
 The barycentric-coordinate to position transformation matrix.
Public Attributes inherited from model::SimplexBase< dim, dim >
SimplicialMesh< dim > *const mesh
const SimplexIDType xID
const SimplexIDType & key

Friends

struct WeakPtrFactory< SimplexFactory< dim, order >, Simplex< dim, order > >

Additional Inherited Members

Static Public Member Functions inherited from model::StaticID< SimplexBase< _dim, order > >
static size_t nextID ()
static size_t & get_count ()
static void set_count (const size_t &newCount)
static void force_count (const size_t &newCount)
static void set_increment (const size_t &newIncrement)
Static Public Attributes inherited from model::SimplexParent< dim, order >
static constexpr int nFaces =SimplexTraits<dim,order>::nFaces
Static Public Attributes inherited from model::SimplexBase< dim, order >
static constexpr short int dim
Static Public Attributes inherited from model::SimplexParent< dim, dim >
static constexpr int nFaces
Static Public Attributes inherited from model::SimplexBase< dim, dim >
static constexpr short int dim

Detailed Description

template<short int dim>
class model::Simplex< dim, dim >

Definition at line 126 of file Simplex.h.

Member Typedef Documentation

◆ ChildIDType

template<short int dim>
typedef SimplexTraits<dim,order-1>::SimplexIDType model::Simplex< dim, dim >::ChildIDType

Definition at line 144 of file Simplex.h.

◆ ChildSimplexType

template<short int dim>
typedef Simplex<dim,order-1> model::Simplex< dim, dim >::ChildSimplexType

Definition at line 143 of file Simplex.h.

◆ MeshRegionType

template<short int dim>
typedef Polyhedron<dim,dim> model::Simplex< dim, dim >::MeshRegionType

Definition at line 146 of file Simplex.h.

◆ SimplexIDType

template<short int dim>
typedef SimplexTraits<dim,order>::SimplexIDType model::Simplex< dim, dim >::SimplexIDType

Definition at line 141 of file Simplex.h.

Member Enumeration Documentation

◆ anonymous enum

template<short int dim>
anonymous enum
Enumerator
nVertices 

Definition at line 139 of file Simplex.h.

◆ anonymous enum

template<short int dim>
anonymous enum
Enumerator
order 

Definition at line 138 of file Simplex.h.

◆ anonymous enum

template<short int dim>
anonymous enum
Enumerator
nFaces 

Definition at line 140 of file Simplex.h.

Constructor & Destructor Documentation

◆ ~Simplex()

template<short int dim>
model::Simplex< dim, dim >::~Simplex ( )

Destructor performs the following operations:

Definition at line 280 of file Simplex.cpp.

Member Function Documentation

◆ boundaryFaces()

template<short int dim>
std::vector< int > model::Simplex< dim, dim >::boundaryFaces ( ) const

Definition at line 344 of file Simplex.cpp.

◆ boundaryNeighbors()

std::set< const Simplex< dim, order > * > model::Simplex< dim, order >::boundaryNeighbors ( ) const

Definition at line 116 of file Simplex.cpp.

◆ childOrder()

template<short int dim>
size_t model::Simplex< dim, dim >::childOrder ( const ChildIDType & childID) const

Definition at line 337 of file Simplex.cpp.

◆ convexDelaunaynSearch()

template<short int dim>
void model::Simplex< dim, dim >::convexDelaunaynSearch ( const bool & searchAllRegions,
const Eigen::Matrix< double, dim, 1 > & P,
std::pair< bool, const Simplex< dim, dim > * > & lastSearched,
std::set< const Simplex< dim, dim > * > & searchSet ) const

Definition at line 381 of file Simplex.cpp.

◆ faceLineIntersection()

template<short int dim>
Eigen::Matrix< double, dim+1, 1 > model::Simplex< dim, dim >::faceLineIntersection ( const Eigen::Matrix< double, dim+1, 1 > & bary0,
const Eigen::Matrix< double, dim+1, 1 > & bary1,
const int & faceID ) const
Parameters
[in]bary0barycentric coordinate of the initial point on the line
[in]P1barycentric coordinate of the final point on the line
[in]faceIDthe ID of the face
Returns
The barycentric cooridinate of the point on the line bary0->bary1 that intersects the facedID-face. If the line bary0->bary1 in on the face, the mean point between bary0 and bary1 is returned.

Definition at line 424 of file Simplex.cpp.

◆ isBoundarySimplex()

template<short int dim>
bool model::Simplex< dim, dim >::isBoundarySimplex ( ) const

Definition at line 360 of file Simplex.cpp.

◆ isRegionBoundarySimplex()

template<short int dim>
bool model::Simplex< dim, dim >::isRegionBoundarySimplex ( ) const

Definition at line 367 of file Simplex.cpp.

◆ outNormal()

Eigen::Matrix< double, dim, 1 > model::Simplex< dim, order >::outNormal ( ) const

Definition at line 118 of file Simplex.cpp.

◆ pos2bary()

template<short int dim>
Eigen::Matrix< double, dim+1, 1 > model::Simplex< dim, dim >::pos2bary ( const Eigen::Matrix< double, dim, 1 > & P) const

Definition at line 374 of file Simplex.cpp.

◆ regionBoundaryNeighbors()

std::set< const Simplex< dim, order > * > model::Simplex< dim, order >::regionBoundaryNeighbors ( ) const

Definition at line 117 of file Simplex.cpp.

◆ regionIDs()

template<short int dim>
std::set< size_t > model::Simplex< dim, dim >::regionIDs ( ) const

Definition at line 460 of file Simplex.cpp.

◆ spouses()

std::set< const Simplex< dim, order > * > model::Simplex< dim, order >::spouses ( ) const
Returns
the set of Simplices sharing children with this

Definition at line 115 of file Simplex.cpp.

◆ WeakPtrFactory< SimplexFactory< dim, order >, Simplex< dim, order > >

template<short int dim>
friend struct WeakPtrFactory< SimplexFactory< dim, order >, Simplex< dim, order > >
friend

Definition at line 158 of file Simplex.h.

Member Data Documentation

◆ nda

template<short int dim>
const Eigen::Matrix<double,dim,dim+1> model::Simplex< dim, dim >::nda

The column matrix of face normals.

Definition at line 156 of file Simplex.h.

◆ p2b

template<short int dim>
const Eigen::Matrix<double,dim+1,dim+1> model::Simplex< dim, dim >::p2b

The position to barycentric-coordinate transformation matrix.

Definition at line 153 of file Simplex.h.

◆ region

template<short int dim>
const std::shared_ptr<MeshRegionType> model::Simplex< dim, dim >::region

Shared pointer to MeshRegioin containing *this.

Definition at line 150 of file Simplex.h.

◆ vol0

template<short int dim>
const double model::Simplex< dim, dim >::vol0

Definition at line 158 of file Simplex.h.


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