Main Page   Data Structures   File List   Data Fields   Globals  

utilf.h

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------------*/
00002 /* SCCS Information: %W%    %G% */
00003 /*----------------------------------------------------------------------------*/
00004 #ifndef UTILF_H
00005 #define UTILF_H
00006 
00007 #include <stdio.h>
00008 #include <stdlib.h>
00009 #include <math.h>
00010 #include "options.h"
00011 
00012 #ifndef PI
00013  #define PI 3.14159265359
00014 #endif
00015 
00016 #define sq(x)           ((x) * (x))
00017 #define cube(x)         ((x) * (x) * (x))
00018 #define MAX(x, y)       ((x) > (y) ? (x) : (y))
00019 #define MIN(x, y)       ((x) < (y) ? (x) : (y))
00020 #define POWER(x, y)     exp((y)*log(x))
00021 
00022 typedef double real;
00023 typedef real *real1D;
00024 typedef real **real2D;
00025 
00026 typedef int *int1D;
00027 typedef int **int2D;
00028 
00029 #define realreadSI  doublereadSI
00030 
00031 extern real findmax(real2D u, int nx, int ny, int *imax, int *jmax);
00032 extern real fmodmax(real2D u, int nx, int ny, int *imax, int *jmax);
00033 extern real fmean(real2D u, real umean, int xs, int nx, int ny);
00034 extern real findmin(real2D u, int nx, int ny, int *imin, int *jmin);
00035 extern real sumfield(real2D u, int nx, int ny);
00036 extern real findninf(real2D u, real2D v, int nx, int ny, 
00037                         int *imax, int *jmax);
00038 extern real dp(real2D p, real2D cc, int nx, int ny);
00039 /* compute the maximum relative error on divergence i.e.
00040    max(abs(div()/volume())) */
00041 extern real rdivmax(real2D div, int nx, int ny, int *imax, int *jmax);
00042 extern void copy(real2D out, real2D in, int nx, int ny);
00043 extern void add(real2D a, real2D b, int nx, int ny);
00044 extern void fill0(real2D u, int nx, int ny);
00045 
00046 #endif
00047 
00048 

Generated on Wed Feb 19 22:26:51 2003 for Markers by doxygen1.2.18