/*****************************************************************************1*2* Elmer, A Finite Element Software for Multiphysical Problems3*4* Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland5*6* This program is free software; you can redistribute it and/or7* modify it under the terms of the GNU General Public License8* as published by the Free Software Foundation; either version 29* of the License, or (at your option) any later version.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16* You should have received a copy of the GNU General Public License17* along with this program (in file fem/GPL-2); if not, write to the18* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,19* Boston, MA 02110-1301, USA.20*21*****************************************************************************/2223/*******************************************************************************24*25* Main include file of ElmerPost. Mainly includes other include files ;-)26*27*******************************************************************************28*29* Author: Juha Ruokolainen30*31* Address: CSC - IT Center for Science Ltd.32* Keilaranta 14, P.O. BOX 40533* 02101 Espoo, Finland34* Tel. +358 0 457 272335* Telefax: +358 0 457 230236* EMail: [email protected]37*38* Date: 26 Sep 199539*40* Modified by:41*42* Date of modification:43*44******************************************************************************/4546#include "../config.h"4748#if defined(WIN32) || defined(MINGW32)49#include <windows.h>50#endif5152#include <stdlib.h>53#include <stdio.h>5455/* #include <malloc.h> */56#include <math.h>5758#include <sys/types.h>5960#include <signal.h>6162#include <elmer/matc.h>636465#if defined(MINGW32) || defined(WIN32)6667#include "tk/tk.h"6869#endif707172#ifdef MODULE_MAIN73#define EXT74#else75#define EXT extern76#endif7778#ifndef MIN79#define MIN(x,y) ( (x)>(y) ? (y) : (x) )80#endif8182#ifndef MAX83#define MAX(x,y) ( (x)>(y) ? (x) : (y) )84#endif8586#ifndef ABS87#define ABS(x) ( (x)>(0) ? (x) : (-(x)) )88#endif8990#define FALSE 091#define TRUE 19293#ifndef DBL_MAX94#define DBL_MAX 1.79769313486231570e+30895#endif9697#ifndef M_PI98#define M_PI (3.1415926535897931)99#endif100101typedef unsigned char logical_t;102103typedef struct104{105char *name;106double *f;107double min,max;108} scalar_t;109110typedef struct111{112char *name;113double *f;114double min[3],max[3];115} vector_t;116117typedef struct118{119int VolumeSides;120int VolumeEdges;121int SurfaceSides;122int StereoMode;123int OutputPS, FitToPagePS;124double StereoTran,StereoRot;125} global_options_t;126127#ifdef MODULE_MAIN128global_options_t GlobalOptions = { FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,0.03,5.00 };129#else130extern global_options_t GlobalOptions;131#endif132133extern double RealTime(),CPUTime();134135#include "geometry.h"136#include "elements/elements.h"137#include "graphics/graphics.h"138#include "visuals/visual.h"139#include "objects/objects.h"140#include "camera/camera.h"141142EXT unsigned int epMouseDown,epMouseDownTakesTooLong;143EXT double GraphicsAspect;144EXT unsigned int GraphicsXSize,GraphicsYSize;145146#ifndef WIN32147EXT XFontStruct *CurrentXFont;148#endif149150EXT int BreakLoop;151152#ifdef MODULE_MAIN153void (*user_hook_before_all)() = NULL;154void (*user_hook_after_all)() = NULL;155156void (*user_hook_camera_before)() = NULL;157void (*user_hook_camera_after)() = NULL;158159void (*user_hook_object_before)() = NULL;160void (*user_hook_object_after)() = NULL;161#else162extern void (*user_hook_before_all)();163extern void (*user_hook_after_all)();164165extern void (*user_hook_camera_before)();166extern void (*user_hook_camera_after)();167168extern void (*user_hook_object_before)();169extern void (*user_hook_object_after)();170#endif171172173