MOAB: Mesh Oriented datABase  (version 5.2.1)
V_EdgeMetric.cpp File Reference
#include "moab/verdict.h"
#include <math.h>
+ Include dependency graph for V_EdgeMetric.cpp:

Go to the source code of this file.




C_FUNC_DEF double v_edge_length (int, double coordinates[][3])
 Calculates edge length.
C_FUNC_DEF void edge_quality (int num_nodes, double coordinates[][3], unsigned int metrics_request_flag, struct EdgeMetricVals *metric_vals)

Define Documentation


Definition at line 23 of file V_EdgeMetric.cpp.

Function Documentation

C_FUNC_DEF void edge_quality ( int  num_nodes,
double  coordinates[][3],
unsigned int  metrics_request_flag,
struct EdgeMetricVals metric_vals 

higher order function for calculating multiple metrics at once.

for an edge, there is only one metric, edge length.

Definition at line 48 of file V_EdgeMetric.cpp.

References EdgeMetricVals::length, V_EDGE_LENGTH, and v_edge_length().

    if( metrics_request_flag & V_EDGE_LENGTH ) metric_vals->length = v_edge_length( num_nodes, coordinates );
C_FUNC_DEF double v_edge_length ( int  ,
double  coordinates[][3] 

Calculates edge length.

length of and edge length is calculated by taking the distance between the end nodes

Definition at line 32 of file V_EdgeMetric.cpp.

References z.

Referenced by moab::VerdictWrapper::all_quality_measures(), edge_quality(), and moab::VerdictWrapper::quality_measure().


    double x = coordinates[1][0] - coordinates[0][0];
    double y = coordinates[1][1] - coordinates[0][1];
    double z = coordinates[1][2] - coordinates[0][2];
    return (double)( sqrt( x * x + y * y + z * z ) );
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines