HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
basic.h
Go to the documentation of this file.
1 
6 #ifndef _BASIC_H_
7 #define _BASIC_H_
8 
9 #if defined(HAVE_CONFIG_H)
10 # include <config.h>
11 #endif
12 
14 #define _MAX_STRING_SIZE_ 500
15 #ifdef debug
16  #define IERR ierr=
17  #define _DECLARE_IERR_ int ierr = 0;
18  #define CHECKERR(ierr) { if (ierr) return(ierr); }
19 #else
20  #define IERR
21  #define _DECLARE_IERR_
22  #define CHECKERR(ierr)
23 #endif
24 
26 #define _MACHINE_ZERO_ 1.0e-14
27 
31 #define _GetCoordinate_(dir,i,dim,ghosts,x,coord) \
32  { \
33  int arraycounter,offset = 0; \
34  for (arraycounter = 0; arraycounter < dir; arraycounter++) offset += (dim[arraycounter]+2*ghosts); \
35  coord = (x[offset+ghosts+i]); \
36  }
37 
39 #define _MIN_GRID_PTS_PER_PROC_ 4
40 
41 #endif