# Function Reference for Metric Calculation Library

## Higher order functions-

num_nodes is the number of nodes, coordinates is the x,y,z data of the nodes, metrics_request_flag is a bitfield for which metrics to calculate (defined below), metric_vals is a struct that store the results.

- hex_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, hex_metrics* metric_vals );
- tet_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, tet_metrics* metric_vals );
- pyramid_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, pyramid_metrics* metric_vals );
- wedge_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, wedge_metrics* metric_vals );
- knife_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, knife_metrics* metric_vals );
- quad_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, quad_metrics* metric_vals );
- tri_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, tri_metrics* metric_vals );
- edge_quality( int num_nodes, double coordinates[][3], int metrics_request_flag, edge_metrics* metric_vals );

## Lower order functions-

num_nodes is the number of nodes, coordinates is the x,y,z data of the nodes. Returns the value.

- double hex_aspect( int num_nodes, double coordinates[][3] );
- double hex_skew( int num_nodes, double coordinates[][3] );
- double hex_taper( int num_nodes, double coordinates[][3] );
- double hex_volume( int num_nodes, double coordinates[][3] );
- double hex_stretch( int num_nodes, double coordinates[][3] );
- double hex_diagonal( int num_nodes, double coordinates[][3] );
- double hex_dimension( int num_nodes, double coordinates[][3] );
- double hex_oddy( int num_nodes, double coordinates[][3] );
- double hex_condition( int num_nodes, double coordinates[][3] );
- double hex_jacobian( int num_nodes, double coordinates[][3] );
- double hex_scaled_jacobian( int num_nodes, double coordinates[][3] );
- double hex_shear( int num_nodes, double coordinates[][3] );
- double hex_shape( int num_nodes, double coordinates[][3] );
- double hex_relative_size( int num_nodes, double coordinates[][3] );
- double hex_shape_and_size( int num_nodes, double coordinates[][3] );

- double tet_aspect( int num_nodes, double coordinates[][3] );
- double tet_aspect_gamma( int num_nodes, double coordinates[][3] );
- double tet_volume( int num_nodes, double coordinates[][3] );
- double tet_condition( int num_nodes, double coordinates[][3] );
- double tet_jacobian( int num_nodes, double coordinates[][3] );
- double tet_scaled_jacobian( int num_nodes, double coordinates[][3] );
- double tet_shear( int num_nodes, double coordinates[][3] );
- double tet_shape( int num_nodes, double coordinates[][3] );
- double tet_relative_size( int num_nodes, double coordinates[][3] );
- double tet_shape_and_size( int num_nodes, double coordinates[][3] );

- double pyramid_volume( int num_nodes, double coordinates[][3] );

- double wedge_volume( int num_nodes, double coordinates[][3] );

- double knife_volume( int num_nodes, double coordinates[][3] );

- double edge_length( int num_nodes, double coordinates[][3] );

- double quad_aspect( int num_num_nodes, double coordinates[][3] );
- double quad_skew( int num_nodes, double coordinates[][3] );
- double quad_taper( int num_nodes, double coordinates[][3] );
- double quad_warpage( int num_nodes, double coordinates[][3] );
- double quad_area( int num_nodes, double coordinates[][3] );
- double quad_stretch( int num_nodes, double coordinates[][3] );
- double quad_smallest_angle( int num_nodes, double coordinates[][3] );
- double quad_largest_angle( int num_nodes, double coordinates[][3] );
- double quad_oddy( int num_nodes, double coordinates[][3] );
- double quad_condition( int num_nodes, double coordinates[][3] );
- double quad_jacobian( int num_nodes, double coordinates[][3] );
- double quad_normalized_jacobian( int num_nodes, double coordinates[][3] );
- double quad_shear( int num_nodes, double coordinates[][3] );
- double quad_shape( int num_nodes, double coordinates[][3] );
- double quad_relative_size( int num_nodes, double coordinates[][3] );
- double quad_shape_and_size( int num_nodes, double coordinates[][3] );

- double tri_aspect( int num_nodes, double coordinates[][3] );
- double tri_area( int num_nodes, double coordinates[][3] );
- double tri_smallest_angle( int num_nodes, double coordinates[][3] );
- double tri_largest_angle( int num_nodes, double coordinates[][3] );
- double tri_condition( int num_nodes, double coordinates[][3] );
- double tri_normalized_jacobian( int num_nodes, double coordinates[][3] );
- double tri_shear( int num_nodes, double coordinates[][3] );
- double tri_shape( int num_nodes, double coordinates[][3] );
- double tri_relative_size( int num_nodes, double coordinates[][3] );
- double tri_shape_and_size( int num_nodes, double coordinates[][3] );

Definitions of types

Definition of metric_request_flags for each type of element:

HEX_ASPECT, HEX_SKEW, HEX_STRETCH, HEX_TAPER, HEX_VOLUME, HEX_DIAGONAL, HEX_DIMENSION, HEX_ODDY, HEX_CONDITION, HEX_JACOBIAN, HEX_SCALED_JACOBIAN, HEX_SHEAR, HEX_SHAPE, HEX_RELATIVE_SIZE, HEX_SHAPE_AND_SIZE, HEX_ALL, HEX_TRADITIONAL, HEX_ROBINSON, HEX_ALGEBRAIC

TET_ASPECT, TET_ASPECT_GAMMA, TET_VOLUME, TET_CONDITION, TET_JACOBIAN, TET_SCALED_JACOBIAN, TET_SHEAR, TET_SHAPE, TET_RELATIVE_SIZE, TET_SHAPE_AND_SIZE, TET_ALL, TET_TRADITIONAL, TET_ROBINSON, TET_ALGEBRAIC

PYRAMID_VOLUME

WEDGE_VOLUME

KNIFE_VOLUME

QUAD_ASPECT, QUAD_SKEW, QUAD_TAPER, QUAD_WARPAGE, QUAD_AREA, QUAD_STRETCH, QUAD_SMALLEST_ANGLE, QUAD_LARGEST_ANGLE, QUAD_ODDY, QUAD_CONDITION, QUAD_JACOBIAN, QUAD_NORMALIZED_JACOBIAN, QUAD_SHEAR, QUAD_SHAPE, QUAD_RELATIVE_SIZE, QUAD_SHAPE_AND_SIZE, QUAD_ALL, QUAD_TRADITIONAL, QUAD_ROBINSON, QUAD_ALGEBRAIC

TRI_ASPECT, TRI_AREA, TRI_SMALLEST_ANGLE, TRI_LARGEST_ANGLE, TRI_CONDITION, TRI_NORMALIZED_JACOBIAN, TRI_SHEAR, TRI_SHAPE, TRI_RELATIVE_SIZE, TRI_SHAPE_AND_SIZE, TRI_ALL, TRI_TRADITIONAL, TRI_ROBINSON, TRI_ALGEBRAIC

EDGE_LENGTH

Definition of structs for holding all the metrics results

struct hex_metrics {

double aspect ;

double condition ;

double diagonal ;

double dimension ;

double distortion ;

double jacobian ;

double oddy ;

double relative_size ;

double scaled_jacobian ;

double shape ;

double shape_and_size ;

double shear ;

double shear_and_size ;

double skew ;

double stretch ;

double taper ;

double volume ; }

struct edge_metrics {

double length ; }

struct knife_metrics {

double volume ; }

struct quad_metrics {

double aspect ;

double area ;

double condition ;

double distortion ;

double jacobian ;

double largest_angle ;

double oddy ;

double relative_size ;

double scaled_jacobian ;

double skew ;

double smallest_angle ;

double shape ;

double shape_and_size ;

double shear ;

double shear_and_size ;

double stretch ;

double taper ;

double warpage ; }

struct pyramid_metrics {

double volume ; }

struct wedge_metrics {

double volume ; }

struct tet_metrics {

double aspect ;

double aspect_gamma ;

double condition ;

double distortion ;

double jacobian ;

double relative_size ;

double scaled_jacobian ;

double shape ;

double shape_and_size ;

double shear ;

double volume ; }

struct tri_metrics {

double area ;

double aspect ;

double condition ;

double distortion ;

double largest_angle ;

double relative_size ;

double scaled_jacobian ;

double smallest_angle ;

double shape ;

double shape_and_size ;

double shear ; }