#include "moab/verdict.h"
#include "verdict_defines.hpp"
#include "VerdictVector.hpp"
#include "V_GaussIntegration.hpp"
#include <memory.h>
Go to the source code of this file.
Macros | |
#define | VERDICT_EXPORTS |
Functions | |
C_FUNC_DEF void | v_set_tet_size (double size) |
Sets average size (volume) of tet, needed for v_tet_relative_size(...) More... | |
int | get_weight (VerdictVector &w1, VerdictVector &w2, VerdictVector &w3) |
C_FUNC_DEF double | v_tet_edge_ratio (int, double coordinates[][3]) |
Calculates tet edge ratio metric. More... | |
C_FUNC_DEF double | v_tet_scaled_jacobian (int, double coordinates[][3]) |
Calculates tet scaled jacobian. More... | |
C_FUNC_DEF double | v_tet_radius_ratio (int, double coordinates[][3]) |
Calculates tet radius ratio metric. More... | |
C_FUNC_DEF double | v_tet_aspect_beta (int, double coordinates[][3]) |
Calculates the radius ratio metric of a positively oriented tet. More... | |
C_FUNC_DEF double | v_tet_aspect_ratio (int, double coordinates[][3]) |
Calculates tet aspect ratio metric. More... | |
C_FUNC_DEF double | v_tet_aspect_gamma (int, double coordinates[][3]) |
Calculates tet aspect gamma metric. More... | |
C_FUNC_DEF double | v_tet_aspect_frobenius (int, double coordinates[][3]) |
Calculates tet aspect frobenius metric. More... | |
C_FUNC_DEF double | v_tet_minimum_angle (int, double coordinates[][3]) |
Calculates tet minimum dihedral angle. More... | |
C_FUNC_DEF double | v_tet_collapse_ratio (int, double coordinates[][3]) |
Calculates tet collapse ratio metric. More... | |
C_FUNC_DEF double | v_tet_volume (int, double coordinates[][3]) |
Calculates tet volume. More... | |
C_FUNC_DEF double | v_tet_condition (int, double coordinates[][3]) |
Calculates tet condition metric. More... | |
C_FUNC_DEF double | v_tet_jacobian (int, double coordinates[][3]) |
Calculates tet jacobian. More... | |
C_FUNC_DEF double | v_tet_shape (int, double coordinates[][3]) |
Calculates tet shape metric. More... | |
C_FUNC_DEF double | v_tet_relative_size_squared (int, double coordinates[][3]) |
Calculates tet relative size metric. More... | |
C_FUNC_DEF double | v_tet_shape_and_size (int num_nodes, double coordinates[][3]) |
Calculates tet shape-size metric. More... | |
C_FUNC_DEF double | v_tet_distortion (int num_nodes, double coordinates[][3]) |
Calculates tet distortion metric. More... | |
C_FUNC_DEF void | v_tet_quality (int num_nodes, double coordinates[][3], unsigned int metrics_request_flag, TetMetricVals *metric_vals) |
Calculates quality metrics for tetrahedral elements. More... | |
Variables | |
double | verdict_tet_size = 0 |
the average volume of a tet More... | |
#define VERDICT_EXPORTS |
Definition at line 23 of file V_TetMetric.cpp.
int get_weight | ( | VerdictVector & | w1, |
VerdictVector & | w2, | ||
VerdictVector & | w3 | ||
) |
get the weights based on the average size of a tet
Definition at line 46 of file V_TetMetric.cpp.
References determinant(), VerdictVector::set(), and verdict_tet_size.
Referenced by v_tet_quality(), and v_tet_relative_size_squared().
C_FUNC_DEF void v_set_tet_size | ( | double | size | ) |
Sets average size (volume) of tet, needed for v_tet_relative_size(...)
set the average volume of a tet
Definition at line 37 of file V_TetMetric.cpp.
References size, and verdict_tet_size.
Referenced by moab::VerdictWrapper::set_size().
C_FUNC_DEF double v_tet_aspect_beta | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates the radius ratio metric of a positively oriented tet.
The radius ratio of a positively-oriented tet, a.k.a. "aspect beta"
NB (P. Pebay 04/16/07): CR / (3.0 * IR) where CR is the circumsphere radius and IR is the inscribed sphere radius if the element has positive orientation. Note that this metric is similar to the radius ratio of a tet, except that it returns VERDICT_DBL_MAX if the element has negative orientation.
Definition at line 265 of file V_TetMetric.cpp.
References VerdictVector::length(), length(), VerdictVector::length_squared(), length_squared(), VerdictVector::set(), v_tet_volume(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_aspect_frobenius | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet aspect frobenius metric.
The aspect frobenius of a tet
NB (P. Pebay 01/22/07): Frobenius condition number when the reference element is regular
Definition at line 426 of file V_TetMetric.cpp.
References VerdictVector::get_xyz(), VerdictVector::set(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_quality().
C_FUNC_DEF double v_tet_aspect_gamma | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet aspect gamma metric.
the aspect gamma of a tet
srms^3 / (8.48528137423857*V) where srms = sqrt(sum(Si^2)/6), where Si is the edge length
Definition at line 381 of file V_TetMetric.cpp.
References VerdictVector::length_squared(), VerdictVector::set(), v_tet_volume(), VERDICT_DBL_MAX, and VERDICT_DBL_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_aspect_ratio | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet aspect ratio metric.
The aspect ratio of a tet
NB (P. Pebay 01/22/07): Hmax / (2 sqrt(6) r) where Hmax and r respectively denote the greatest edge length and the inradius of the tetrahedron
Definition at line 318 of file V_TetMetric.cpp.
References VerdictVector::length(), VerdictVector::length_squared(), VerdictVector::set(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_quality().
C_FUNC_DEF double v_tet_collapse_ratio | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet collapse ratio metric.
The collapse ratio of a tet
Definition at line 526 of file V_TetMetric.cpp.
References VerdictVector::length(), VerdictVector::set(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_quality().
C_FUNC_DEF double v_tet_condition | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet condition metric.
the condition of a tet
condition number of the jacobian matrix at any corner
Definition at line 629 of file V_TetMetric.cpp.
References VerdictVector::set(), VERDICT_DBL_MAX, and VERDICT_DBL_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_distortion | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet distortion metric.
the distortion of a tet
Definition at line 765 of file V_TetMetric.cpp.
References GaussIntegration::calculate_derivative_at_nodes_3d_tet(), GaussIntegration::calculate_shape_function_3d_tet(), GaussIntegration::get_shape_func(), GaussIntegration::initialize(), maxNumberNodes, maxTotalNumberGaussPoints, VerdictVector::set(), and VERDICT_DBL_MAX.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_quality().
C_FUNC_DEF double v_tet_edge_ratio | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet edge ratio metric.
the edge ratio of a tet
NB (P. Pebay 01/22/07): Hmax / Hmin where Hmax and Hmin are respectively the maximum and the minimum edge lengths
Definition at line 71 of file V_TetMetric.cpp.
References VerdictVector::length_squared(), VerdictVector::set(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_jacobian | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet jacobian.
the jacobian of a tet
TODO
Definition at line 670 of file V_TetMetric.cpp.
References VerdictVector::set().
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_minimum_angle | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet minimum dihedral angle.
The minimum angle of a tet
NB (P. Pebay 01/22/07): minimum nonoriented dihedral angle
Definition at line 475 of file V_TetMetric.cpp.
References VerdictVector::length(), VerdictVector::set(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_quality().
C_FUNC_DEF void v_tet_quality | ( | int | num_nodes, |
double | coordinates[][3], | ||
unsigned int | metrics_request_flag, | ||
TetMetricVals * | metric_vals | ||
) |
Calculates quality metrics for tetrahedral elements.
the quality metrics of a tet
Definition at line 862 of file V_TetMetric.cpp.
References TetMetricVals::aspect_beta, TetMetricVals::aspect_frobenius, TetMetricVals::aspect_gamma, TetMetricVals::aspect_ratio, TetMetricVals::collapse_ratio, TetMetricVals::condition, TetMetricVals::distortion, get_weight(), TetMetricVals::jacobian, VerdictVector::length(), length(), VerdictVector::length_squared(), length_squared(), TetMetricVals::minimum_angle, TetMetricVals::radius_ratio, TetMetricVals::relative_size_squared, TetMetricVals::scaled_jacobian, VerdictVector::set(), TetMetricVals::shape, TetMetricVals::shape_and_size, V_TET_ASPECT_BETA, V_TET_ASPECT_FROBENIUS, v_tet_aspect_frobenius(), V_TET_ASPECT_GAMMA, V_TET_ASPECT_RATIO, v_tet_aspect_ratio(), V_TET_COLLAPSE_RATIO, v_tet_collapse_ratio(), V_TET_CONDITION, V_TET_DISTORTION, v_tet_distortion(), V_TET_JACOBIAN, V_TET_MINIMUM_ANGLE, v_tet_minimum_angle(), V_TET_RADIUS_RATIO, v_tet_radius_ratio(), V_TET_RELATIVE_SIZE_SQUARED, V_TET_SCALED_JACOBIAN, V_TET_SHAPE, V_TET_SHAPE_AND_SIZE, V_TET_VOLUME, VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, VERDICT_MIN, and TetMetricVals::volume.
Referenced by moab::VerdictWrapper::all_quality_measures().
C_FUNC_DEF double v_tet_radius_ratio | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet radius ratio metric.
The radius ratio of a tet
NB (P. Pebay 04/16/07): CR / (3.0 * IR) where CR is the circumsphere radius and IR is the inscribed sphere radius. Note that this metric is similar to the aspect beta of a tet, except that it does not return VERDICT_DBL_MAX if the element has negative orientation.
Definition at line 209 of file V_TetMetric.cpp.
References VerdictVector::length(), length(), VerdictVector::length_squared(), length_squared(), VerdictVector::set(), v_tet_volume(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_quality().
C_FUNC_DEF double v_tet_relative_size_squared | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet relative size metric.
the relative size of a tet
Min(J,1/J), where J is the determinant of the weighted Jacobian matrix
Definition at line 727 of file V_TetMetric.cpp.
References get_weight(), size, v_tet_volume(), and VERDICT_DBL_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_shape_and_size().
C_FUNC_DEF double v_tet_scaled_jacobian | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet scaled jacobian.
the scaled jacobian of a tet
minimum of the jacobian divided by the lengths of 3 edge vectors
Definition at line 153 of file V_TetMetric.cpp.
References VerdictVector::length_squared(), length_squared(), VerdictVector::set(), VERDICT_DBL_MAX, and VERDICT_DBL_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_shape | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet shape metric.
the shape of a tet
3/ condition number of weighted jacobian matrix
Definition at line 691 of file V_TetMetric.cpp.
References VerdictVector::set(), VERDICT_DBL_MIN, and VERDICT_MAX.
Referenced by moab::VerdictWrapper::quality_measure(), and v_tet_shape_and_size().
C_FUNC_DEF double v_tet_shape_and_size | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet shape-size metric.
the shape and size of a tet
Product of the shape and relative size
Definition at line 752 of file V_TetMetric.cpp.
References size, v_tet_relative_size_squared(), and v_tet_shape().
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_tet_volume | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates tet volume.
the volume of a tet
1/6 * jacobian at a corner node
Definition at line 606 of file V_TetMetric.cpp.
References VerdictVector::set().
Referenced by moab::VerdictWrapper::quality_measure(), v_tet_aspect_beta(), v_tet_aspect_gamma(), v_tet_radius_ratio(), and v_tet_relative_size_squared().
double verdict_tet_size = 0 |
the average volume of a tet
Definition at line 32 of file V_TetMetric.cpp.
Referenced by get_weight(), and v_set_tet_size().