MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Go to the source code of this file.
Defines | |
#define | VERDICT_MIN(a, b) ( ( a ) < ( b ) ? ( a ) : ( b ) ) |
#define | VERDICT_MAX(a, b) ( ( a ) > ( b ) ? ( a ) : ( b ) ) |
#define | jacobian_matrix(a, b, c, d, e, f, g) |
#define | form_t(m11, m21, m12, m22, mw11, mw21, mw12, mw22, detmw, xm11, xm21, xm12, xm22) |
#define | metric_matrix(m11, m21, m12, m22, gm11, gm12, gm22) |
Enumerations | |
enum | VerdictBoolean { VERDICT_FALSE = 0, VERDICT_TRUE = 1 } |
Functions | |
double | determinant (double a, double b, double c, double d) |
double | determinant (const VerdictVector &v1, const VerdictVector &v2, const VerdictVector &v3) |
double | normalize_jacobian (double jacobi, VerdictVector &v1, VerdictVector &v2, VerdictVector &v3, int tet_flag=0) |
double | norm_squared (double m11, double m21, double m12, double m22) |
int | skew_matrix (double gm11, double gm12, double gm22, double det, double &qm11, double &qm21, double &qm12, double &qm22) |
void | inverse (const VerdictVector &x1, const VerdictVector &x2, const VerdictVector &x3, VerdictVector &u1, VerdictVector &u2, VerdictVector &u3) |
void | form_Q (const VerdictVector &v1, const VerdictVector &v2, const VerdictVector &v3, VerdictVector &q1, VerdictVector &q2, VerdictVector &q3) |
void | product (VerdictVector &a1, VerdictVector &a2, VerdictVector &a3, VerdictVector &b1, VerdictVector &b2, VerdictVector &b3, VerdictVector &c1, VerdictVector &c2, VerdictVector &c3) |
double | norm_squared (VerdictVector &x1, VerdictVector &x2, VerdictVector &x3) |
double | skew_x (VerdictVector &q1, VerdictVector &q2, VerdictVector &q3, VerdictVector &qw1, VerdictVector &qw2, VerdictVector &qw3) |
Variables | |
double | verdictSqrt2 |
#define form_t | ( | m11, | |
m21, | |||
m12, | |||
m22, | |||
mw11, | |||
mw21, | |||
mw12, | |||
mw22, | |||
detmw, | |||
xm11, | |||
xm21, | |||
xm12, | |||
xm22 | |||
) |
xm11 = ( ( m11 ) * ( mw22 ) - ( m12 ) * ( mw21 ) ) / ( detmw ); \ ( xm21 ) = ( ( m21 ) * ( mw22 ) - ( m22 ) * ( mw21 ) ) / ( detmw ); \ ( xm12 ) = ( ( m12 ) * ( mw11 ) - ( m11 ) * ( mw12 ) ) / ( detmw ); \ ( xm22 ) = ( ( m22 ) * ( mw11 ) - ( m21 ) * ( mw12 ) ) / ( detmw );
Definition at line 67 of file verdict_defines.hpp.
#define jacobian_matrix | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g | |||
) |
double jac_mat_tmp; \
jac_mat_tmp = sqrt( a ); \
if( jac_mat_tmp == 0 ) \
{ \
( d ) = 0; \
( e ) = 0; \
( f ) = 0; \
( g ) = 0; \
} \
else \
{ \
( d ) = jac_mat_tmp; \
( e ) = 0; \
( f ) = ( b ) / jac_mat_tmp; \
( g ) = ( c ) / jac_mat_tmp; \
}
Definition at line 48 of file verdict_defines.hpp.
#define metric_matrix | ( | m11, | |
m21, | |||
m12, | |||
m22, | |||
gm11, | |||
gm12, | |||
gm22 | |||
) |
gm11 = ( m11 ) * ( m11 ) + ( m21 ) * ( m21 ); \ ( gm12 ) = ( m11 ) * ( m12 ) + ( m21 ) * ( m22 ); \ ( gm22 ) = ( m12 ) * ( m12 ) + ( m22 ) * ( m22 );
Definition at line 116 of file verdict_defines.hpp.
#define VERDICT_MAX | ( | a, | |
b | |||
) | ( ( a ) > ( b ) ? ( a ) : ( b ) ) |
Definition at line 36 of file verdict_defines.hpp.
Referenced by diag_length(), hex_edge_length(), v_hex_diagonal(), v_hex_edge_ratio(), v_hex_jacobian(), v_hex_max_aspect_frobenius(), v_hex_max_edge_ratio(), v_hex_med_aspect_frobenius(), v_hex_oddy(), v_hex_quality(), v_hex_relative_size_squared(), v_hex_scaled_jacobian(), v_hex_shape(), v_hex_shape_and_size(), v_hex_shear(), v_hex_shear_and_size(), v_hex_skew(), v_hex_stretch(), v_hex_taper(), v_hex_volume(), v_quad_area(), v_quad_aspect_ratio(), v_quad_condition(), v_quad_edge_ratio(), v_quad_jacobian(), v_quad_max_aspect_frobenius(), v_quad_max_edge_ratio(), v_quad_maximum_angle(), v_quad_med_aspect_frobenius(), v_quad_minimum_angle(), v_quad_oddy(), v_quad_quality(), v_quad_radius_ratio(), v_quad_relative_size_squared(), v_quad_scaled_jacobian(), v_quad_shape(), v_quad_shape_and_size(), v_quad_shear_and_size(), v_quad_stretch(), v_quad_warpage(), v_tet_aspect_frobenius(), v_tet_aspect_ratio(), v_tet_collapse_ratio(), v_tet_edge_ratio(), v_tet_minimum_angle(), v_tet_quality(), v_tet_shape(), v_tri_area(), v_tri_aspect_frobenius(), v_tri_aspect_ratio(), v_tri_distortion(), v_tri_edge_ratio(), v_tri_maximum_angle(), v_tri_minimum_angle(), v_tri_quality(), v_tri_radius_ratio(), v_tri_relative_size_squared(), v_tri_scaled_jacobian(), v_tri_shape(), and v_tri_shape_and_size().
#define VERDICT_MIN | ( | a, | |
b | |||
) | ( ( a ) < ( b ) ? ( a ) : ( b ) ) |
Definition at line 35 of file verdict_defines.hpp.
Referenced by diag_length(), hex_edge_length(), v_hex_diagonal(), v_hex_edge_ratio(), v_hex_jacobian(), v_hex_max_aspect_frobenius(), v_hex_max_edge_ratio(), v_hex_med_aspect_frobenius(), v_hex_oddy(), v_hex_quality(), v_hex_relative_size_squared(), v_hex_scaled_jacobian(), v_hex_shape(), v_hex_shape_and_size(), v_hex_shear(), v_hex_shear_and_size(), v_hex_skew(), v_hex_stretch(), v_hex_taper(), v_hex_volume(), v_quad_area(), v_quad_aspect_ratio(), v_quad_condition(), v_quad_distortion(), v_quad_edge_ratio(), v_quad_jacobian(), v_quad_max_aspect_frobenius(), v_quad_max_edge_ratio(), v_quad_maximum_angle(), v_quad_med_aspect_frobenius(), v_quad_minimum_angle(), v_quad_oddy(), v_quad_quality(), v_quad_radius_ratio(), v_quad_relative_size_squared(), v_quad_scaled_jacobian(), v_quad_shape(), v_quad_shape_and_size(), v_quad_shear(), v_quad_shear_and_size(), v_quad_skew(), v_quad_stretch(), v_quad_taper(), v_quad_warpage(), v_tet_aspect_beta(), v_tet_aspect_frobenius(), v_tet_aspect_ratio(), v_tet_collapse_ratio(), v_tet_edge_ratio(), v_tet_minimum_angle(), v_tet_quality(), v_tet_radius_ratio(), v_tri_area(), v_tri_aspect_frobenius(), v_tri_aspect_ratio(), v_tri_condition(), v_tri_distortion(), v_tri_edge_ratio(), v_tri_maximum_angle(), v_tri_minimum_angle(), v_tri_quality(), v_tri_radius_ratio(), v_tri_relative_size_squared(), v_tri_scaled_jacobian(), v_tri_shape(), and v_tri_shape_and_size().
enum VerdictBoolean |
Definition at line 29 of file verdict_defines.hpp.
{ VERDICT_FALSE = 0, VERDICT_TRUE = 1 };
double determinant | ( | double | a, |
double | b, | ||
double | c, | ||
double | d | ||
) | [inline] |
Definition at line 38 of file verdict_defines.hpp.
Referenced by get_weight(), inverse(), v_quad_quality(), v_quad_relative_size_squared(), v_tri_quality(), and v_tri_relative_size_squared().
{
return ( ( a ) * ( d ) - ( b ) * ( c ) );
}
double determinant | ( | const VerdictVector & | v1, |
const VerdictVector & | v2, | ||
const VerdictVector & | v3 | ||
) | [inline] |
Definition at line 43 of file verdict_defines.hpp.
{
return v1 % ( v2 * v3 );
}
void form_Q | ( | const VerdictVector & | v1, |
const VerdictVector & | v2, | ||
const VerdictVector & | v3, | ||
VerdictVector & | q1, | ||
VerdictVector & | q2, | ||
VerdictVector & | q3 | ||
) | [inline] |
Definition at line 210 of file verdict_defines.hpp.
References moab::cross(), and VerdictVector::set().
{ double g11, g12, g13, g22, g23, g33; g11 = v1 % v1; g12 = v1 % v2; g13 = v1 % v3; g22 = v2 % v2; g23 = v2 % v3; g33 = v3 % v3; double rtg11 = sqrt( g11 ); double rtg22 = sqrt( g22 ); double rtg33 = sqrt( g33 ); VerdictVector temp1; temp1 = v1 * v2; double cross = sqrt( temp1 % temp1 ); double q11, q21, q31; double q12, q22, q32; double q13, q23, q33; q11 = 1; q21 = 0; q31 = 0; q12 = g12 / rtg11 / rtg22; q22 = cross / rtg11 / rtg22; q32 = 0; q13 = g13 / rtg11 / rtg33; q23 = ( g11 * g23 - g12 * g13 ) / rtg11 / rtg33 / cross; temp1 = v2 * v3; q33 = ( v1 % temp1 ) / rtg33 / cross; q1.set( q11, q21, q31 ); q2.set( q12, q22, q32 ); q3.set( q13, q23, q33 ); }
void inverse | ( | const VerdictVector & | x1, |
const VerdictVector & | x2, | ||
const VerdictVector & | x3, | ||
VerdictVector & | u1, | ||
VerdictVector & | u2, | ||
VerdictVector & | u3 | ||
) | [inline] |
Definition at line 143 of file verdict_defines.hpp.
References determinant(), VerdictVector::set(), VerdictVector::x(), VerdictVector::y(), and VerdictVector::z().
Referenced by moab::element_utility::Linear_tet_map< Entity_handle, moab::Matrix3 >::set_tet(), skew_x(), moab::element_utility::Linear_hex_map< moab::Matrix3 >::solve_inverse(), and test_spectral_hex().
double norm_squared | ( | double | m11, |
double | m21, | ||
double | m12, | ||
double | m22 | ||
) | [inline] |
Definition at line 111 of file verdict_defines.hpp.
Referenced by skew_x().
{
return m11 * m11 + m21 * m21 + m12 * m12 + m22 * m22;
}
double norm_squared | ( | VerdictVector & | x1, |
VerdictVector & | x2, | ||
VerdictVector & | x3 | ||
) | [inline] |
Definition at line 280 of file verdict_defines.hpp.
{
return ( x1 % x1 ) + ( x2 % x2 ) + ( x3 % x3 );
}
double normalize_jacobian | ( | double | jacobi, |
VerdictVector & | v1, | ||
VerdictVector & | v2, | ||
VerdictVector & | v3, | ||
int | tet_flag = 0 |
||
) | [inline] |
Definition at line 75 of file verdict_defines.hpp.
References VerdictVector::length_squared(), and verdictSqrt2.
{ double return_value = 0.0; if( jacobi != 0.0 ) { double l1, l2, l3, length_product; // Note: there may be numerical problems if one is a lot shorter // than the others this way. But scaling each vector before the // triple product would involve 3 square roots instead of just // one. l1 = v1.length_squared(); l2 = v2.length_squared(); l3 = v3.length_squared(); length_product = sqrt( l1 * l2 * l3 ); // if some numerical scaling problem, or just plain roundoff, // then push back into range [-1,1]. if( length_product < fabs( jacobi ) ) { length_product = fabs( jacobi ); } if( tet_flag == 1 ) return_value = verdictSqrt2 * jacobi / length_product; else return_value = jacobi / length_product; } return return_value; }
void product | ( | VerdictVector & | a1, |
VerdictVector & | a2, | ||
VerdictVector & | a3, | ||
VerdictVector & | b1, | ||
VerdictVector & | b2, | ||
VerdictVector & | b3, | ||
VerdictVector & | c1, | ||
VerdictVector & | c2, | ||
VerdictVector & | c3 | ||
) | [inline] |
Definition at line 258 of file verdict_defines.hpp.
References VerdictVector::set(), VerdictVector::x(), VerdictVector::y(), and VerdictVector::z().
Referenced by skew_x().
int skew_matrix | ( | double | gm11, |
double | gm12, | ||
double | gm22, | ||
double | det, | ||
double & | qm11, | ||
double & | qm21, | ||
double & | qm12, | ||
double & | qm22 | ||
) | [inline] |
Definition at line 121 of file verdict_defines.hpp.
{ double tmp = sqrt( gm11 * gm22 ); if( tmp == 0 ) { return false; } qm11 = 1; qm21 = 0; qm12 = gm12 / tmp; qm22 = det / tmp; return true; }
double skew_x | ( | VerdictVector & | q1, |
VerdictVector & | q2, | ||
VerdictVector & | q3, | ||
VerdictVector & | qw1, | ||
VerdictVector & | qw2, | ||
VerdictVector & | qw3 | ||
) | [inline] |
Definition at line 286 of file verdict_defines.hpp.
References inverse(), norm_squared(), product(), and VERDICT_DBL_MIN.
{ double normsq1, normsq2, kappa; VerdictVector u1, u2, u3; VerdictVector x1, x2, x3; inverse( qw1, qw2, qw3, u1, u2, u3 ); product( q1, q2, q3, u1, u2, u3, x1, x2, x3 ); inverse( x1, x2, x3, u1, u2, u3 ); normsq1 = norm_squared( x1, x2, x3 ); normsq2 = norm_squared( u1, u2, u3 ); kappa = sqrt( normsq1 * normsq2 ); double skew = 0; if( kappa > VERDICT_DBL_MIN ) skew = 3 / kappa; return skew; }
double verdictSqrt2 |
Definition at line 30 of file V_GaussIntegration.cpp.
Referenced by normalize_jacobian().