“30” “30”](http://www.ees.lanl.gov/staff/rao/mstkla/mstkla.md#UTILITIES:) “30” “30”](http://www.ees.lanl.gov/staff/rao/mstkla/GeomVertex.md) “30” “30”](http://www.ees.lanl.gov/staff/rao/mstkla/example.md)

“169” “131”

UTILITIES:

void ReportError(char modulename, *char message, *ErrType severity);

Report an error message. The severity may be specified as

MESSG: Print a message to the screen

WARNING: Print message with additional attention grabbing text

ERROR: Print message with additional attention grabbing text

FATAL: Print attention grabbing message and exit.

“31” “12” VECTOR FUNCTIONS:

void vdiff(double a, *double b, *double *a_minus_b);

void vsum(double a, *double b, *double *a_plus_b);

double vmag2(double *v);

double vmag(double *v);

void vcross(double a, *double b, *double *a_cross_b);

double vdot(double a, *double *b);

void vnorm(double a, *double *unita);

“31” “12”REAL NUMBER COMPARISON FUNCTIONS:

int REAL_le(double a, double b);

int REAL_ge(double a, double b);

int REAL_eq(double a, double b);

“31” “12” COMP GEOM FUNCTIONS:

int pntInTriangle2(double pnt, *double ( tri)[3], *double tol, int flag, int mtype, *int *locID);

Check if a point that is guaranteed to be in the plane of a triangle is inside the triangle itself.

If flag = 1, check if point is strictly inside

flag = 0, check if point is inside or on the boundary within a real tolerance ‘tol’

Return value =  1 (inside), 0 (outside), -1 (on boundary)

If point is on the boundary, mtype indicates type of entity it is on

locID indicates the local ID number of the vertex or edge it is on

int pntInTet(double pnt, *double ( tet)[3], *double tol, int flag, int mtype, *int *locID);

Check if a point is inside a tet

If flag = 1, check if point is strictly inside

flag = 0, check if point is inside or on the booundary

within a real tolerance ‘tol’

Return value =  1 (inside), 0 (outside), -1 (on boundary)

If point is on the boundary, mtype indicates type of entity it is on

locID indicates the local ID number of the vertex or edge it is on

void Tri_CircumCen(double ( xyz)[3], *double *cen);

double Tri_Area(double ( *xyz)[3]);

void   Tri_Normal(double ( xyz)[3], *double *normal);

double Tet_Volume(double ( *xyz)[3]);

void   Tet_CircumCen(double ( xyz)[3], *double *cen);

“30” “30”](http://www.ees.lanl.gov/staff/rao/mstkla/mstkla.md#UTILITIES:) “30” “30”](http://www.ees.lanl.gov/staff/rao/mstkla/GeomVertex.md) “30” “30”](http://www.ees.lanl.gov/staff/rao/mstkla/example.md)