NiHu  2.0
NiHu::element_base< Derived > Class Template Reference

The geometrical element representation. More...

#include <element.hpp>

Public Types

enum  { id = element_traits::id<Derived>::value, num_nodes = lset_t::num_nodes }
 
typedef Derived type
 self-returning metafunction
 
typedef element_traits::space_type< Derived >::type space_t
 the element space type
 
typedef element_traits::lset< Derived >::type lset_t
 the element's L-set
 
typedef space_t::scalar_t scalar_t
 the element's scalar variable
 
typedef lset_t::domain_t domain_t
 the element's reference domain
 
typedef domain_t::xi_t xi_t
 type of the shape functions' independent variable \(\xi\)
 
typedef element_traits::location_value_type< Derived, 0 >::type x_t
 type of the element's physical location variable \( x \)
 
typedef element_traits::location_return_type< Derived, 0 >::type x_return_type
 return type of the element physical location variable when obtained by get_x
 
typedef element_traits::location_value_type< Derived, 1 >::type dx_t
 type of the gradient of the element's physical location variable \( x'_{\xi} \)
 
typedef element_traits::location_return_type< Derived, 1 >::type dx_return_type
 return type of the element physical location derivative
 
typedef element_traits::location_value_type< Derived, 2 >::type ddx_t
 type of the second derivative of the element's physical location variable \( x''_{\xi} \)
 
typedef element_traits::location_return_type< Derived, 2 >::type ddx_return_type
 return type of the element physical location second derivative
 
typedef Eigen::Matrix< unsigned, num_nodes, 1 > nodes_t
 vector type that stores the element's corner node indices
 
typedef element_traits::coords_type< Derived >::type coords_t
 matrix type that stores the element's corner nodes \(x_i\)
 
typedef elem_id_t id_t
 type that stores the element's id
 

Public Member Functions

NIHU_CRTP_HELPERS element_base ()
 default constructor for std::vector container
 
 element_base (coords_t const &coords, unsigned id=0, nodes_t const &nodes=nodes_t())
 constructor More...
 
const id_tget_id (void) const
 return elem id More...
 
const nodes_tget_nodes (void) const
 return nodes More...
 
const coords_tget_coords (void) const
 return coordinates More...
 
x_return_type get_x (xi_t const &xi) const
 return element location More...
 
dx_return_type get_dx (xi_t const &xi) const
 return element location gradient More...
 
ddx_return_type get_ddx (xi_t const &xi) const
 return element location second derivative matrix More...
 
const x_tget_center (void) const
 return element center More...
 
const scalar_tget_linear_size_estimate (void) const
 return linear size estimate More...
 
template<class OtherElem >
element_overlapping get_overlapping (OtherElem const &other) const
 check overlapping state with other element More...
 
Derived get_linearized_elem (xi_t const &xi0) const
 construct linearized elem around an intrinsic coordinate More...
 

Protected Attributes

id_t m_id
 the element's identifier
 
nodes_t m_nodes
 the element's nodal indices in the mesh
 
coords_t m_coords
 the element's corner coordinates \(x_i\)
 
x_t m_center
 the element's center
 
scalar_t m_linear_size_estimate
 estimated linear size of an element
 
element_traits::location_factory_functor< Derived, 0 >::type x_computer
 functor computing the locations
 
element_traits::location_factory_functor< Derived, 1 >::type dx_computer
 functor computing the location derivative vector
 
element_traits::location_factory_functor< Derived, 2 >::type ddx_computer
 functor computing the location second derivative matrix
 

Detailed Description

template<class Derived>
class NiHu::element_base< Derived >

The geometrical element representation.

Template Parameters
DerivedCRTP derived class

Definition at line 194 of file element.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<class Derived >
anonymous enum
Enumerator
id 

the element id

num_nodes 

the number of nodes

Definition at line 212 of file element.hpp.

Constructor & Destructor Documentation

◆ element_base()

template<class Derived >
NiHu::element_base< Derived >::element_base ( coords_t const &  coords,
unsigned  id = 0,
nodes_t const &  nodes = nodes_t() 
)
inline

constructor

Parameters
[in]idthe elem id
[in]nodesthe elem node indices
[in]coordsthe elem coordinates

Definition at line 270 of file element.hpp.

Member Function Documentation

◆ get_center()

template<class Derived >
const x_t& NiHu::element_base< Derived >::get_center ( void  ) const
inline

return element center

Returns
location \(x_0\) in the element center

Definition at line 353 of file element.hpp.

◆ get_coords()

template<class Derived >
const coords_t& NiHu::element_base< Derived >::get_coords ( void  ) const
inline

return coordinates

Returns
elem coordinates

Definition at line 314 of file element.hpp.

◆ get_ddx()

template<class Derived >
ddx_return_type NiHu::element_base< Derived >::get_ddx ( xi_t const &  xi) const
inline

return element location second derivative matrix

Parameters
[in]xilocation \( \xi \) in the base domain
Returns
location gradient \( x''_{\xi} \) in the element

Definition at line 344 of file element.hpp.

◆ get_dx()

template<class Derived >
dx_return_type NiHu::element_base< Derived >::get_dx ( xi_t const &  xi) const
inline

return element location gradient

Parameters
[in]xilocation \(\xi\) in the base domain
Returns
location gradient \(x'_{\xi}\) in the element

Definition at line 334 of file element.hpp.

◆ get_id()

template<class Derived >
const id_t& NiHu::element_base< Derived >::get_id ( void  ) const
inline

return elem id

Returns
elem id

Definition at line 296 of file element.hpp.

◆ get_linear_size_estimate()

template<class Derived >
const scalar_t& NiHu::element_base< Derived >::get_linear_size_estimate ( void  ) const
inline

return linear size estimate

Returns
linear size estimate

Definition at line 362 of file element.hpp.

◆ get_linearized_elem()

template<class Derived >
Derived NiHu::element_base< Derived >::get_linearized_elem ( xi_t const &  xi0) const
inline

construct linearized elem around an intrinsic coordinate

Parameters
[in]xi0reference point

Definition at line 416 of file element.hpp.

◆ get_nodes()

template<class Derived >
const nodes_t& NiHu::element_base< Derived >::get_nodes ( void  ) const
inline

return nodes

Returns
elem nodes

Definition at line 305 of file element.hpp.

◆ get_overlapping()

template<class Derived >
template<class OtherElem >
element_overlapping NiHu::element_base< Derived >::get_overlapping ( OtherElem const &  other) const
inline

check overlapping state with other element

Template Parameters
OtherElemtype of the other element
Parameters
[in]otherreference to the other element
Returns
structure containing overlapping information

Definition at line 374 of file element.hpp.

◆ get_x()

template<class Derived >
x_return_type NiHu::element_base< Derived >::get_x ( xi_t const &  xi) const
inline

return element location

Parameters
[in]

Definition at line 324 of file element.hpp.


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