/* * =================================================================== * COMPUTATIONAL ENVIRONMENT FOR FINITE ELEMENT ANALYSIS (Version 2) * * Copyright (C) 1992, * Systems Research Center, * University of Maryland, MD 20742 * * Permission to use, copy, modify, and distribute this software * and its documentation for any purpose can be obtained only with the * express permission of the author, provided that the above copyright * notice appear in all copies. SRC, University of Maryland makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * ------------------------------------------------------------------- * defs.h : Standard definitions * ------------------------------------------------------------------- * * Written by: M.A. Austin July, 1992 - Jan, 1993 * =================================================================== */ #ifndef DEFS_H #define DEFS_H /* ----------------- * Numerical Values * ----------------- */ #define MAXTOKSIZE 80 #define SHORTOKSIZE 16 #define MAX_ITERATIONS 75 #define MAXREAL 1.7e38 #define MINREAL 1.0e-37 #define PI 3.14159265358979323846 #define DEG 57.29577951308232087680 /* * ----------------- * Math Macros * ----------------- */ enum boolean { TRUE = 1, FALSE = 0 }; #define MIN(a,b) ( a < b ? a : b) #define MAX(a,b) ( a > b ? a : b) #define SIGN(a) ( a < 0 ? 1 : -1) #define ABS(a) (((a) > 0) ? (a) : (-a)) #define abs(x) (((x) > 0)? (x) : -(x)) #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) #define isletter(c) (isalpha(c) || (c) == '_') #define cot(a) ((double)(cos((double)(a)) /sin((double)(a)))) #define square(x) x*x #define Deg2Rad (PI / 180.0) /* * ------------------- * Logical Definitions * ------------------- */ #define ONE 1 #define NOT_FINISHED 1 #define FINISHED 0 #define PASSED 1 #define FAILED 0 #define YES 1 #define NO 0 #define UP 1 #define DOWN 0 #define COUNTED 1 #define NOTCOUNTED 2 #define FAILURE 0 #define SUCCESS 1 #endif