Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::GeomUtil::LinearHexMap Class Reference

Shape function for trilinear hexahedron. More...

+ Inheritance diagram for moab::GeomUtil::LinearHexMap:
+ Collaboration diagram for moab::GeomUtil::LinearHexMap:

Public Member Functions

 LinearHexMap (const CartVect *corner_coords)
 
virtual CartVect center_xi () const
 Return \(\vec \xi\) corresponding to logical center of element. More...
 
virtual CartVect evaluate (const CartVect &xi) const
 Evaluate mapping function (calculate \(\vec x = F($\vec \xi)\) ) More...
 
virtual Matrix3 jacobian (const CartVect &xi) const
 Evaluate Jacobian of mapping function. More...
 
- Public Member Functions inherited from moab::GeomUtil::VolMap
bool solve_inverse (const CartVect &x, CartVect &xi, double tol) const
 Evaluate inverse of mapping function (calculate \(\vec \xi = F^-1($\vec x)\) ) More...
 

Private Attributes

const CartVectcorners
 

Static Private Attributes

static const double corner_xi [8][3]
 

Detailed Description

Shape function for trilinear hexahedron.

Definition at line 1459 of file GeomUtil.cpp.

Constructor & Destructor Documentation

◆ LinearHexMap()

moab::GeomUtil::LinearHexMap::LinearHexMap ( const CartVect corner_coords)
inline

Definition at line 1462 of file GeomUtil.cpp.

1462 : corners( corner_coords ) {}

Member Function Documentation

◆ center_xi()

CartVect moab::GeomUtil::LinearHexMap::center_xi ( ) const
virtual

Return \(\vec \xi\) corresponding to logical center of element.

Implements moab::GeomUtil::VolMap.

Definition at line 1474 of file GeomUtil.cpp.

1475  {
1476  return CartVect( 0.0 );
1477  }

◆ evaluate()

CartVect moab::GeomUtil::LinearHexMap::evaluate ( const CartVect xi) const
virtual

Evaluate mapping function (calculate \(\vec x = F($\vec \xi)\) )

Implements moab::GeomUtil::VolMap.

Definition at line 1479 of file GeomUtil.cpp.

1480  {
1481  CartVect x( 0.0 );
1482  for( unsigned i = 0; i < 8; ++i )
1483  {
1484  const double N_i =
1485  ( 1 + xi[0] * corner_xi[i][0] ) * ( 1 + xi[1] * corner_xi[i][1] ) * ( 1 + xi[2] * corner_xi[i][2] );
1486  x += N_i * corners[i];
1487  }
1488  x *= 0.125;
1489  return x;
1490  }

References corner_xi, and corners.

◆ jacobian()

Matrix3 moab::GeomUtil::LinearHexMap::jacobian ( const CartVect xi) const
virtual

Evaluate Jacobian of mapping function.

Implements moab::GeomUtil::VolMap.

Definition at line 1492 of file GeomUtil.cpp.

1493  {
1494  Matrix3 J( 0.0 );
1495  for( unsigned i = 0; i < 8; ++i )
1496  {
1497  const double xi_p = 1 + xi[0] * corner_xi[i][0];
1498  const double eta_p = 1 + xi[1] * corner_xi[i][1];
1499  const double zeta_p = 1 + xi[2] * corner_xi[i][2];
1500  const double dNi_dxi = corner_xi[i][0] * eta_p * zeta_p;
1501  const double dNi_deta = corner_xi[i][1] * xi_p * zeta_p;
1502  const double dNi_dzeta = corner_xi[i][2] * xi_p * eta_p;
1503  J( 0, 0 ) += dNi_dxi * corners[i][0];
1504  J( 1, 0 ) += dNi_dxi * corners[i][1];
1505  J( 2, 0 ) += dNi_dxi * corners[i][2];
1506  J( 0, 1 ) += dNi_deta * corners[i][0];
1507  J( 1, 1 ) += dNi_deta * corners[i][1];
1508  J( 2, 1 ) += dNi_deta * corners[i][2];
1509  J( 0, 2 ) += dNi_dzeta * corners[i][0];
1510  J( 1, 2 ) += dNi_dzeta * corners[i][1];
1511  J( 2, 2 ) += dNi_dzeta * corners[i][2];
1512  }
1513  return J *= 0.125;
1514  }

References corner_xi, and corners.

Member Data Documentation

◆ corner_xi

const double moab::GeomUtil::LinearHexMap::corner_xi
staticprivate
Initial value:
= { { -1, -1, -1 }, { 1, -1, -1 }, { 1, 1, -1 }, { -1, 1, -1 },
{ -1, -1, 1 }, { 1, -1, 1 }, { 1, 1, 1 }, { -1, 1, 1 } }

Definition at line 1469 of file GeomUtil.cpp.

Referenced by evaluate(), and jacobian().

◆ corners

const CartVect* moab::GeomUtil::LinearHexMap::corners
private

Definition at line 1468 of file GeomUtil.cpp.

Referenced by evaluate(), and jacobian().


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