Class representing a 3-D mapping function (e.g. shape function for volume element) More...
Public Member Functions | |
virtual CartVect | center_xi () const =0 |
Return \vec \xi corresponding to logical center of element. More... | |
virtual CartVect | evaluate (const CartVect &xi) const =0 |
Evaluate mapping function (calculate \vec x = F($\vec \xi) ) More... | |
virtual Matrix3 | jacobian (const CartVect &xi) const =0 |
Evaluate Jacobian of mapping function. More... | |
bool | solve_inverse (const CartVect &x, CartVect &xi, double tol) const |
Evaluate inverse of mapping function (calculate \vec \xi = F^-1($\vec x) ) More... | |
Class representing a 3-D mapping function (e.g. shape function for volume element)
Definition at line 16 of file ElemUtil.cpp.
|
pure virtual |
Return \vec \xi corresponding to logical center of element.
Implemented in moab::ElemUtil::LinearHexMap.
Referenced by solve_inverse().
Evaluate mapping function (calculate \vec x = F($\vec \xi) )
Implemented in moab::ElemUtil::LinearHexMap.
Referenced by solve_inverse().
Evaluate Jacobian of mapping function.
Implemented in moab::ElemUtil::LinearHexMap.
Referenced by solve_inverse().
Evaluate inverse of mapping function (calculate \vec \xi = F^-1($\vec x) )
Definition at line 29 of file ElemUtil.cpp.
30 {
31 const double error_tol_sqr = tol * tol;
32 double det;
33 xi = center_xi();
34 CartVect delta = evaluate( xi ) - x;
35 Matrix3 J;
36 while( delta % delta > error_tol_sqr )
37 {
38 J = jacobian( xi );
39 det = J.determinant();
40 if( det < std::numeric_limits< double >::epsilon() ) return false;
41 xi -= J.inverse() * delta;
42 delta = evaluate( xi ) - x;
43 }
44 return true;
45 }
References center_xi(), moab::Matrix3::determinant(), evaluate(), moab::Matrix3::inverse(), and jacobian().
Referenced by moab::ElemUtil::nat_coords_trilinear_hex().