#include <linear_hex_map.hpp>
|
const CartVect & | reference_points (const std::size_t &i) const |
|
bool | is_contained (const CartVect ¶ms, const double tol) const |
|
bool | solve_inverse (const CartVect &point, CartVect ¶ms, const CartVect *verts, const double tol=1.e-6) const |
|
void | evaluate_forward (const CartVect &p, const CartVect *verts, CartVect &f) const |
|
double | integrate_scalar_field (const CartVect *points, const double *field_values) const |
|
template<typename Point , typename Points > |
Matrix3 & | jacobian (const Point &p, const Points &points, Matrix3 &J) const |
|
Definition at line 16 of file linear_hex_map.hpp.
◆ Linear_hex_map() [1/2]
moab::element_utility::Linear_hex_map::Linear_hex_map |
( |
| ) |
|
|
inline |
◆ Linear_hex_map() [2/2]
moab::element_utility::Linear_hex_map::Linear_hex_map |
( |
const Linear_hex_map & |
| ) |
|
|
inline |
◆ evaluate_forward()
void moab::element_utility::Linear_hex_map::evaluate_forward |
( |
const CartVect & |
p, |
|
|
const CartVect * |
verts, |
|
|
CartVect & |
f |
|
) |
| const |
|
inlineprivate |
◆ evaluate_reverse()
template<typename Moab , typename Entity_handle , typename Points , typename Point >
std::pair< bool, CartVect > moab::element_utility::Linear_hex_map::evaluate_reverse |
( |
const double * |
verts, |
|
|
const double * |
eval_point, |
|
|
const double |
tol = 1.e-6 |
|
) |
| const |
|
inline |
◆ integrate_scalar_field()
double moab::element_utility::Linear_hex_map::integrate_scalar_field |
( |
const CartVect * |
points, |
|
|
const double * |
field_values |
|
) |
| const |
|
inlineprivate |
◆ is_contained()
bool moab::element_utility::Linear_hex_map::is_contained |
( |
const CartVect & |
params, |
|
|
const double |
tol |
|
) |
| const |
|
inlineprivate |
Definition at line 49 of file linear_hex_map.hpp.
52 return ( params[0] >= -1. - tol ) && ( params[0] <= 1. + tol ) && ( params[1] >= -1. - tol ) &&
53 ( params[1] <= 1. + tol ) && ( params[2] >= -1. - tol ) && ( params[2] <= 1. + tol );
Referenced by evaluate_reverse().
◆ jacobian()
template<typename Point , typename Points >
Matrix3& moab::element_utility::Linear_hex_map::jacobian |
( |
const Point & |
p, |
|
|
const Points & |
points, |
|
|
Matrix3 & |
J |
|
) |
| const |
|
inlineprivate |
◆ reference_points()
const CartVect& moab::element_utility::Linear_hex_map::reference_points |
( |
const std::size_t & |
i | ) |
const |
|
inlineprivate |
Definition at line 41 of file linear_hex_map.hpp.
43 const CartVect rpts[8] = { CartVect( -1, -1, -1 ), CartVect( 1, -1, -1 ), CartVect( 1, 1, -1 ),
44 CartVect( -1, 1, -1 ), CartVect( -1, -1, 1 ), CartVect( 1, -1, 1 ),
45 CartVect( 1, 1, 1 ), CartVect( -1, 1, 1 ) };
Referenced by evaluate_forward().
◆ solve_inverse()
bool moab::element_utility::Linear_hex_map::solve_inverse |
( |
const CartVect & |
point, |
|
|
CartVect & |
params, |
|
|
const CartVect * |
verts, |
|
|
const double |
tol = 1.e-6 |
|
) |
| const |
|
inlineprivate |
Definition at line 56 of file linear_hex_map.hpp.
61 const double error_tol_sqr = tol * tol;
62 CartVect delta( 0.0, 0.0, 0.0 );
66 std::size_t num_iterations = 0;
67 #ifdef LINEAR_HEX_DEBUG
70 ss << point[0] <<
", " << point[1] <<
", " << point[2] << std::endl;
72 for(
int i = 0; i < 8; ++i )
73 ss << points[i][0] <<
", " << points[i][1] <<
", " << points[i][2] << std::endl;
76 while( delta.length_squared() > error_tol_sqr )
78 #ifdef LINEAR_HEX_DEBUG
79 ss <<
"Iter #: " << num_iterations <<
" Err: " << delta.length() <<
" Iterate: ";
80 ss << params[0] <<
", " << params[1] <<
", " << params[2] << std::endl;
82 if( ++num_iterations >= 5 )
88 double det = moab::Matrix3::determinant3( J );
89 if( fabs( det ) < 1.e-10 )
91 #ifdef LINEAR_HEX_DEBUG
92 std::cerr << ss.str();
94 #ifndef LINEAR_HEX_DEBUG
95 std::cerr << x[0] <<
", " << x[1] <<
", " << x[2] << std::endl;
97 std::cerr <<
"inverse solve failure: det: " << det << std::endl;
References evaluate_forward(), moab::Matrix3::inverse(), jacobian(), moab::CartVect::length(), and moab::CartVect::length_squared().
Referenced by evaluate_reverse().
The documentation for this class was generated from the following file: