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

Go to the source code of this file.

Defines

#define VERDICT_EXPORTS

Functions

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

#define VERDICT_EXPORTS

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.

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