Path: blob/devel/ElmerGUI/Application/plugins/egdef.h
3203 views
/* femdef.h */1/* General definitions for the FEM program. */23#ifndef _FEMDEF_H_4#define _FEMDEF_H_56#ifndef _COMMON_H_7typedef double Real;8typedef int Integer;9#define TRUE 110#define FALSE 011#endif1213/* Natural constants */14#ifndef FM_PI15#define FM_PI 3.141592616#endif17#define NEARZERO 1.0e-501819/* the number and order of the axes */20#define XAXIS 021#define YAXIS 122#define ZAXIS 223#define DIM 22425/* four possible directions */26#define INDEFINITE -127#define RIGHT 128#define UP 229#define LEFT 330#define DOWN 03132/* bilinear 2D element sides */33#define BOTLEFT 034#define TOPLEFT 335#define BOTRIGHT 136#define TOPRIGHT 23738/* linear 1D element */39#define FIRST 040#define SECOND 14142/* coordinate systems */43#define COORD_CART2 044#define COORD_AXIS 145#define COORD_POLAR 246#define COORD_CART3 347#define COORD_CART1 448#define COORD_CYL 54950/* Different types of boundary conditions */51#define BNDR_NOTHING 05253/* Type of knot */54#define KNOTS_ALL 155#define KNOTS_DIRICHLET 256#define KNOTS_FREE 35758/* Type of numbering */59#define NUMBER_XY 160#define NUMBER_YX 261#define NUMBER_1D 36263/* The values corresponding the different materials in the mesh. */64#define MAT_SMALLER -1165#define MAT_BIGGER -966#define MAT_ANYTHING -1067#define MAT_BOT -168#define MAT_RIGHT -269#define MAT_TOP -370#define MAT_LEFT -471#define MAT_NOTHING 072#define MAT_FIRSTNUMBER 273#define MAT_MAXNUMBER 5074/* #define MAT_ORIGO 1 */7576/* Elementary functions */77#define MIN(x, y) ( ((x) < (y)) ? (x) : (y) )78#define MAX(x, y) ( ((x) > (y)) ? (x) : (y) )79#define SGN(x) ( ((x) < 0.) ? (-1) : (((x) > 0.) ? (1) : 0) )80#define ABS(x) ( (x) >= 0 ? (x) : -(x))81#define FABS(x) ( (x) >= 0.0 ? (x) : -(x))82#define SQR(x) ((x) * (x))83#define POS(x) ((x) > 0.0 ? (x) : 0.0)84#define NEG(x) ((x) < 0.0 ? (x) : 0.0)85#define RAD_TO_DEG(x) ((x)*180.0/FM_PI)86#define DEG_TO_RAD(x) ((x)*FM_PI/180.0)8788#endif899091