Feellgood
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
element< N, NPI > Class Template Referenceabstract

Template abstract class, mother class for tetraedrons and facettes. More...

#include <element.h>

Inheritance diagram for element< N, NPI >:
Facette::Fac Tetra::Tet

Public Member Functions

 element (const std::vector< Nodes::Node > &_p_node, const int _idx, std::initializer_list< int > &_i)
 
constexpr int getN (void) const
 
constexpr int getNPI (void) const
 
void buildMatP (Eigen::Ref< Eigen::Matrix< double, 2 *N, 3 *N >> P)
 
void assemblage_mat (const int NOD, std::vector< Eigen::Triplet< double >> &K) const
 
void assemblage_vect (const int NOD, Eigen::Ref< Eigen::VectorXd > L) const
 
void infos () const
 
virtual void getPtGauss (Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >> result) const =0
 

Public Attributes

std::vector< int > ind
 
int idxPrm
 
Eigen::Matrix< double, NPI, 1 > weight
 
Eigen::Matrix< double, 2 *N, 2 *N > Kp
 
Eigen::Matrix< double, 2 *N, 1 > Lp
 

Protected Member Functions

const Nodes::NodegetNode (const int i) const
 
bool existNodes (void)
 
void zeroBasing (void)
 

Private Member Functions

virtual void orientate ()=0
 

Private Attributes

const std::vector< Nodes::Node > & refNode
 

Detailed Description

template<int N, int NPI>
class element< N, NPI >

Template abstract class, mother class for tetraedrons and facettes.

template parameters are N number of sommits and NPI number of interpolation points. It contains a list of indices to the N nodes of the element, a reference to the full nodes vector, and index refering to the associated material parameters. All indices are zero based, derived class constructor should call zerobasing() if needed. It contains also the vector and matrix weight, Kp, Lp, P related to finite element computations. weight values are not initialized, they have to be set by derived class constructor. Member function getPtGauss() returns Gauss points. orientate() is a pure virtual function, it should manipulate indices to orientate positively the element.

Constructor & Destructor Documentation

◆ element()

template<int N, int NPI>
element< N, NPI >::element ( const std::vector< Nodes::Node > &  _p_node,
const int  _idx,
std::initializer_list< int > &  _i 
)
inlineexplicit

constructor

Parameters
_p_nodevector of nodes
_idxindex to params
_iindices to the nodes

Member Function Documentation

◆ assemblage_mat()

template<int N, int NPI>
void element< N, NPI >::assemblage_mat ( const int  NOD,
std::vector< Eigen::Triplet< double >> &  K 
) const
inline

assemble the big sparse matrix K from tetra or facette inner matrix Kp

Parameters
[in]NODnb nodes
[out]KCOO matrix

◆ assemblage_vect()

template<int N, int NPI>
void element< N, NPI >::assemblage_vect ( const int  NOD,
Eigen::Ref< Eigen::VectorXd >  L 
) const
inline

assemble the big vector L from tetra or facette inner vector Lp

Parameters
[in]NODnb nodes
[out]Lvector

◆ buildMatP()

template<int N, int NPI>
void element< N, NPI >::buildMatP ( Eigen::Ref< Eigen::Matrix< double, 2 *N, 3 *N >>  P)
inline

build matrix P direcly from ep,eq in nodes P is block diagonal: ( Epx Epy Epz ) ( Eqz Eqy Eqz ) with each block E(p|q)(x|y|z) a N*N diagonal matrix see here http://eigen.tuxfamily.org/dox-devel/TopicTemplateKeyword.html for the wierd template syntax

Parameters
[out]Pblock diagonal matrix

◆ existNodes()

template<int N, int NPI>
bool element< N, NPI >::existNodes ( void  )
inlineprotected

returns true if mesh node vector is not empty

◆ getN()

template<int N, int NPI>
constexpr int element< N, NPI >::getN ( void  ) const
inlineconstexpr

getter for N

◆ getNode()

template<int N, int NPI>
const Nodes::Node& element< N, NPI >::getNode ( const int  i) const
inlineprotected

returns reference to node at ind[i] from mesh node vector

◆ getNPI()

template<int N, int NPI>
constexpr int element< N, NPI >::getNPI ( void  ) const
inlineconstexpr

getter for NPI

◆ getPtGauss()

template<int N, int NPI>
virtual void element< N, NPI >::getPtGauss ( Eigen::Ref< Eigen::Matrix< double, Nodes::DIM, NPI >>  result) const
pure virtual

computes Gauss point of the element, return in result

Implemented in Tetra::Tet, and Facette::Fac.

◆ infos()

template<int N, int NPI>
void element< N, NPI >::infos ( void  ) const
inline

info: print node indices of the element and the vector index of the associated param

◆ orientate()

template<int N, int NPI>
virtual void element< N, NPI >::orientate ( )
privatepure virtual

a method to orientate the element

Implemented in Tetra::Tet, and Facette::Fac.

◆ zeroBasing()

template<int N, int NPI>
void element< N, NPI >::zeroBasing ( void  )
inlineprotected

zeroBasing: index convention Matlab/msh (one based) -> C++ (zero based)

Member Data Documentation

◆ idxPrm

template<int N, int NPI>
int element< N, NPI >::idxPrm

index of the material parameters of the element

◆ ind

template<int N, int NPI>
std::vector<int> element< N, NPI >::ind

indices to the nodes

◆ Kp

template<int N, int NPI>
Eigen::Matrix<double,2*N,2*N> element< N, NPI >::Kp

matrix for integrales

◆ Lp

template<int N, int NPI>
Eigen::Matrix<double,2*N,1> element< N, NPI >::Lp

vector for integrales

◆ refNode

template<int N, int NPI>
const std::vector<Nodes::Node>& element< N, NPI >::refNode
private

vector of nodes

◆ weight

template<int N, int NPI>
Eigen::Matrix<double,NPI,1> element< N, NPI >::weight

weights hat function of the element


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