#include "moab/verdict.h"
#include "VerdictVector.hpp"
#include "V_GaussIntegration.hpp"
#include "verdict_defines.hpp"
#include <memory.h>
Go to the source code of this file.
Macros | |
#define | VERDICT_EXPORTS |
#define | make_hex_nodes(coord, pos) |
#define | make_edge_length_squares(edges, lengths) |
#define | SQR(x) ( ( x ) * ( x ) ) |
Functions | |
int | v_hex_get_weight (VerdictVector &v1, VerdictVector &v2, VerdictVector &v3) |
weights based on the average size of a hex More... | |
C_FUNC_DEF void | v_set_hex_size (double size) |
returns the average volume of a hex More... | |
void | make_hex_edges (double coordinates[][3], VerdictVector edges[12]) |
make VerdictVectors from coordinates More... | |
void | localize_hex_coordinates (double coordinates[][3], VerdictVector position[8]) |
double | safe_ratio3 (const double numerator, const double denominator, const double max_ratio) |
double | safe_ratio (const double numerator, const double denominator) |
double | condition_comp (const VerdictVector &xxi, const VerdictVector &xet, const VerdictVector &xze) |
double | oddy_comp (const VerdictVector &xxi, const VerdictVector &xet, const VerdictVector &xze) |
double | hex_edge_length (int max_min, double coordinates[][3]) |
calcualates edge lengths of a hex More... | |
double | diag_length (int max_min, double coordinates[][3]) |
VerdictVector | calc_hex_efg (int efg_index, VerdictVector coordinates[8]) |
calculates efg values More... | |
C_FUNC_DEF double | v_hex_edge_ratio (int, double coordinates[][3]) |
Calculates hex edge ratio metric. More... | |
C_FUNC_DEF double | v_hex_max_edge_ratio (int, double coordinates[][3]) |
Calculates hex maximum of edge ratio. More... | |
C_FUNC_DEF double | v_hex_skew (int, double coordinates[][3]) |
Calculates hex skew metric. More... | |
C_FUNC_DEF double | v_hex_taper (int, double coordinates[][3]) |
Calculates hex taper metric. More... | |
C_FUNC_DEF double | v_hex_volume (int, double coordinates[][3]) |
Calculates hex volume. More... | |
C_FUNC_DEF double | v_hex_stretch (int, double coordinates[][3]) |
Calculates hex stretch metric. More... | |
C_FUNC_DEF double | v_hex_diagonal (int, double coordinates[][3]) |
Calculates hex diagonal metric. More... | |
C_FUNC_DEF double | v_hex_dimension (int, double coordinates[][3]) |
Calculates hex dimension metric. More... | |
C_FUNC_DEF double | v_hex_oddy (int, double coordinates[][3]) |
Calculates hex oddy metric. More... | |
C_FUNC_DEF double | v_hex_med_aspect_frobenius (int, double coordinates[][3]) |
Calculates hex condition metric. More... | |
C_FUNC_DEF double | v_hex_max_aspect_frobenius (int, double coordinates[][3]) |
Calculates hex condition metric. More... | |
C_FUNC_DEF double | v_hex_condition (int, double coordinates[][3]) |
C_FUNC_DEF double | v_hex_jacobian (int, double coordinates[][3]) |
Calculates hex jacobian metric. More... | |
C_FUNC_DEF double | v_hex_scaled_jacobian (int, double coordinates[][3]) |
Calculates hex scaled jacobian metric. More... | |
C_FUNC_DEF double | v_hex_shear (int, double coordinates[][3]) |
Calculates hex shear metric. More... | |
C_FUNC_DEF double | v_hex_shape (int, double coordinates[][3]) |
Calculates hex shape metric. More... | |
C_FUNC_DEF double | v_hex_relative_size_squared (int, double coordinates[][3]) |
Calculates hex relative size metric. More... | |
C_FUNC_DEF double | v_hex_shape_and_size (int num_nodes, double coordinates[][3]) |
Calculates hex shape-size metric. More... | |
C_FUNC_DEF double | v_hex_shear_and_size (int num_nodes, double coordinates[][3]) |
Calculates hex shear-size metric. More... | |
C_FUNC_DEF double | v_hex_distortion (int num_nodes, double coordinates[][3]) |
Calculates hex distortion metric. More... | |
C_FUNC_DEF void | v_hex_quality (int num_nodes, double coordinates[][3], unsigned int metrics_request_flag, HexMetricVals *metric_vals) |
Calculates quality metrics for hexahedral elements. More... | |
Variables | |
double | verdict_hex_size = 0 |
the average volume of a hex More... | |
#define make_edge_length_squares | ( | edges, | |
lengths | |||
) |
Definition at line 68 of file V_HexMetric.cpp.
#define make_hex_nodes | ( | coord, | |
pos | |||
) |
Definition at line 62 of file V_HexMetric.cpp.
#define SQR | ( | x | ) | ( ( x ) * ( x ) ) |
Definition at line 783 of file V_HexMetric.cpp.
#define VERDICT_EXPORTS |
Definition at line 23 of file V_HexMetric.cpp.
VerdictVector calc_hex_efg | ( | int | efg_index, |
VerdictVector | coordinates[8] | ||
) |
calculates efg values
Definition at line 430 of file V_HexMetric.cpp.
References VerdictVector::set().
Referenced by v_hex_jacobian(), v_hex_max_aspect_frobenius(), v_hex_max_edge_ratio(), v_hex_oddy(), v_hex_quality(), v_hex_scaled_jacobian(), v_hex_skew(), v_hex_taper(), and v_hex_volume().
double condition_comp | ( | const VerdictVector & | xxi, |
const VerdictVector & | xet, | ||
const VerdictVector & | xze | ||
) |
Definition at line 227 of file V_HexMetric.cpp.
References VERDICT_DBL_MAX, and VERDICT_DBL_MIN.
Referenced by v_hex_max_aspect_frobenius(), v_hex_med_aspect_frobenius(), and v_hex_quality().
double diag_length | ( | int | max_min, |
double | coordinates[][3] | ||
) |
Definition at line 380 of file V_HexMetric.cpp.
References VERDICT_MAX, and VERDICT_MIN.
Referenced by v_hex_diagonal(), v_hex_quality(), and v_hex_stretch().
double hex_edge_length | ( | int | max_min, |
double | coordinates[][3] | ||
) |
calcualates edge lengths of a hex
Definition at line 274 of file V_HexMetric.cpp.
References VERDICT_MAX, and VERDICT_MIN.
Referenced by v_hex_stretch().
void localize_hex_coordinates | ( | double | coordinates[][3], |
VerdictVector | position[8] | ||
) |
localizes hex coordinates
Definition at line 106 of file V_HexMetric.cpp.
References VerdictVector::set(), VerdictVector::x(), VerdictVector::y(), and VerdictVector::z().
void make_hex_edges | ( | double | coordinates[][3], |
VerdictVector | edges[12] | ||
) |
make VerdictVectors from coordinates
Definition at line 75 of file V_HexMetric.cpp.
References VerdictVector::set().
Referenced by v_hex_edge_ratio(), and v_hex_quality().
double oddy_comp | ( | const VerdictVector & | xxi, |
const VerdictVector & | xet, | ||
const VerdictVector & | xze | ||
) |
Definition at line 243 of file V_HexMetric.cpp.
References VERDICT_DBL_MAX, and VERDICT_DBL_MIN.
Referenced by v_hex_oddy(), and v_hex_quality().
double safe_ratio | ( | const double | numerator, |
const double | denominator | ||
) |
Definition at line 209 of file V_HexMetric.cpp.
References VERDICT_DBL_MAX, and VERDICT_DBL_MIN.
Referenced by v_hex_diagonal(), v_hex_max_edge_ratio(), v_hex_quality(), v_hex_stretch(), and v_hex_taper().
double safe_ratio3 | ( | const double | numerator, |
const double | denominator, | ||
const double | max_ratio | ||
) |
Definition at line 186 of file V_HexMetric.cpp.
C_FUNC_DEF double v_hex_condition | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
The maximum Frobenius condition of a hex, a.k.a. condition NB (P. Pebay 01/25/07): this method is maintained for backwards compatibility only. It will become deprecated at some point.
Definition at line 1371 of file V_HexMetric.cpp.
References v_hex_max_aspect_frobenius().
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_diagonal | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex diagonal metric.
diagonal ratio of a hex
Minimum diagonal length / maximum diagonal length
Definition at line 771 of file V_HexMetric.cpp.
References diag_length(), safe_ratio(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_quality().
C_FUNC_DEF double v_hex_dimension | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex dimension metric.
dimension of a hex
Pronto-specific characteristic length for stable time step calculation. Char_length = Volume / 2 grad Volume
Definition at line 791 of file V_HexMetric.cpp.
References SQR.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_quality().
C_FUNC_DEF double v_hex_distortion | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex distortion metric.
distortion of a hex
Definition at line 2228 of file V_HexMetric.cpp.
References GaussIntegration::calculate_derivative_at_nodes_3d(), GaussIntegration::calculate_shape_function_3d_hex(), GaussIntegration::get_shape_func(), GaussIntegration::initialize(), maxNumberNodes, maxTotalNumberGaussPoints, VerdictVector::set(), and VERDICT_DBL_MAX.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_quality().
C_FUNC_DEF double v_hex_edge_ratio | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex edge ratio metric.
the edge ratio of a hex
NB (P. Pebay 01/23/07): Hmax / Hmin where Hmax and Hmin are respectively the maximum and the minimum edge lengths
Definition at line 529 of file V_HexMetric.cpp.
References VerdictVector::length_squared(), make_hex_edges(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_quality().
int v_hex_get_weight | ( | VerdictVector & | v1, |
VerdictVector & | v2, | ||
VerdictVector & | v3 | ||
) |
weights based on the average size of a hex
Definition at line 39 of file V_HexMetric.cpp.
References VerdictVector::set(), and verdict_hex_size.
Referenced by v_hex_quality(), and v_hex_relative_size_squared().
C_FUNC_DEF double v_hex_jacobian | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex jacobian metric.
jacobian of a hex
Minimum pointwise volume of local map at 8 corners & center of hex
Definition at line 1382 of file V_HexMetric.cpp.
References calc_hex_efg(), make_hex_nodes, VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_max_aspect_frobenius | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex condition metric.
maximum Frobenius condition number of a hex
Maximum Frobenius condition number of the Jacobian matrix at 8 corners NB (P. Pebay 01/25/07): this metric is calculated by taking the maximum of the 8 Frobenius aspects at each corner of the hex, when the reference corner is right isosceles.
Definition at line 1243 of file V_HexMetric.cpp.
References calc_hex_efg(), condition_comp(), make_hex_nodes, VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_condition().
C_FUNC_DEF double v_hex_max_edge_ratio | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex maximum of edge ratio.
max edge ratio of a hex
Maximum edge length ratio at hex center
Definition at line 643 of file V_HexMetric.cpp.
References calc_hex_efg(), VerdictVector::length(), make_hex_nodes, safe_ratio(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_med_aspect_frobenius | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex condition metric.
the average Frobenius aspect of a hex
NB (P. Pebay 01/20/07): this metric is calculated by averaging the 8 Frobenius aspects at each corner of the hex, when the reference corner is right isosceles.
Definition at line 1164 of file V_HexMetric.cpp.
References condition_comp(), make_hex_nodes, VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_quality().
C_FUNC_DEF double v_hex_oddy | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex oddy metric.
oddy of a hex
General distortion measure based on left Cauchy-Green Tensor
Definition at line 1014 of file V_HexMetric.cpp.
References calc_hex_efg(), make_hex_nodes, oddy_comp(), VerdictVector::set(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF void v_hex_quality | ( | int | num_nodes, |
double | coordinates[][3], | ||
unsigned int | metrics_request_flag, | ||
HexMetricVals * | metric_vals | ||
) |
Calculates quality metrics for hexahedral elements.
multiple quality metrics of a hex
Definition at line 2651 of file V_HexMetric.cpp.
References calc_hex_efg(), HexMetricVals::condition, condition_comp(), diag_length(), HexMetricVals::diagonal, HexMetricVals::dimension, HexMetricVals::distortion, HexMetricVals::edge_ratio, HexMetricVals::jacobian, VerdictVector::length(), VerdictVector::length_squared(), length_squared(), make_edge_length_squares, make_hex_edges(), make_hex_nodes, HexMetricVals::max_edge_ratio, HexMetricVals::med_aspect_frobenius, VerdictVector::normalize(), HexMetricVals::oddy, oddy_comp(), HexMetricVals::relative_size_squared, safe_ratio(), HexMetricVals::scaled_jacobian, HexMetricVals::shape, HexMetricVals::shape_and_size, HexMetricVals::shear, HexMetricVals::shear_and_size, HexMetricVals::skew, HexMetricVals::stretch, HexMetricVals::taper, V_HEX_CONDITION, V_HEX_DIAGONAL, v_hex_diagonal(), V_HEX_DIMENSION, v_hex_dimension(), V_HEX_DISTORTION, v_hex_distortion(), V_HEX_EDGE_RATIO, v_hex_edge_ratio(), v_hex_get_weight(), V_HEX_JACOBIAN, V_HEX_MAX_EDGE_RATIO, V_HEX_MED_ASPECT_FROBENIUS, v_hex_med_aspect_frobenius(), V_HEX_ODDY, 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_hex_volume(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_FALSE, VERDICT_MAX, VERDICT_MIN, VERDICT_TRUE, and HexMetricVals::volume.
Referenced by moab::VerdictWrapper::all_quality_measures().
C_FUNC_DEF double v_hex_relative_size_squared | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex relative size metric.
relative size of a hex
Min( J, 1/J ), where J is determinant of weighted Jacobian matrix
Definition at line 2090 of file V_HexMetric.cpp.
References make_hex_nodes, size, v_hex_get_weight(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), v_hex_shape_and_size(), and v_hex_shear_and_size().
C_FUNC_DEF double v_hex_scaled_jacobian | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex scaled jacobian metric.
scaled jacobian of a hex
Minimum Jacobian divided by the lengths of the 3 edge vectors
Definition at line 1507 of file V_HexMetric.cpp.
References calc_hex_efg(), VerdictVector::length_squared(), make_hex_nodes, VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_shape | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex shape metric.
shape of a hex
3/Condition number of weighted Jacobian matrix
Definition at line 1931 of file V_HexMetric.cpp.
References make_hex_nodes, VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_shape_and_size().
C_FUNC_DEF double v_hex_shape_and_size | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex shape-size metric.
shape and size of a hex
Product of Shape and Relative Size
Definition at line 2198 of file V_HexMetric.cpp.
References size, v_hex_relative_size_squared(), v_hex_shape(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_shear | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex shear metric.
shear of a hex
3/Condition number of Jacobian Skew matrix
Definition at line 1733 of file V_HexMetric.cpp.
References VerdictVector::length_squared(), make_hex_nodes, VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_shear_and_size().
C_FUNC_DEF double v_hex_shear_and_size | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex shear-size metric.
shear and size of a hex
Product of Shear and Relative Size
Definition at line 2214 of file V_HexMetric.cpp.
References size, v_hex_relative_size_squared(), v_hex_shear(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_skew | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex skew metric.
skew of a hex
Maximum ||cosA|| where A is the angle between edges at hex center.
Definition at line 674 of file V_HexMetric.cpp.
References calc_hex_efg(), make_hex_nodes, VerdictVector::normalize(), VERDICT_DBL_MAX, VERDICT_DBL_MIN, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_stretch | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex stretch metric.
stretch of a hex
sqrt(3) * minimum edge length / maximum diagonal length
Definition at line 753 of file V_HexMetric.cpp.
References diag_length(), hex_edge_length(), safe_ratio(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_taper | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex taper metric.
taper of a hex
Maximum ratio of lengths derived from opposite edges.
Definition at line 704 of file V_HexMetric.cpp.
References calc_hex_efg(), VerdictVector::length(), make_hex_nodes, safe_ratio(), VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure().
C_FUNC_DEF double v_hex_volume | ( | int | num_nodes, |
double | coordinates[][3] | ||
) |
Calculates hex volume.
volume of a hex
Jacobian at hex center
Definition at line 732 of file V_HexMetric.cpp.
References calc_hex_efg(), make_hex_nodes, VERDICT_DBL_MAX, VERDICT_MAX, and VERDICT_MIN.
Referenced by moab::VerdictWrapper::quality_measure(), and v_hex_quality().
C_FUNC_DEF void v_set_hex_size | ( | double | size | ) |
returns the average volume of a hex
Sets average size (volume) of hex, needed for v_hex_relative_size(...)
Definition at line 57 of file V_HexMetric.cpp.
References size, and verdict_hex_size.
Referenced by moab::VerdictWrapper::set_size().
double verdict_hex_size = 0 |
the average volume of a hex
Definition at line 36 of file V_HexMetric.cpp.
Referenced by v_hex_get_weight(), and v_set_hex_size().