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 File Reference

Some basic definitions and macros. More...

Go to the source code of this file.

Macros

#define _MAX_STRING_SIZE_   500
 
#define IERR   ierr=
 
#define _DECLARE_IERR_   int ierr = 0;
 
#define CHECKERR(ierr)   { if (ierr) return(ierr); }
 
#define _MACHINE_ZERO_   1.0e-14
 
#define _GetCoordinate_(dir, i, dim, ghosts, x, coord)
 
#define _MIN_GRID_PTS_PER_PROC_   4
 

Detailed Description

Some basic definitions and macros.

Author
Debojyoti Ghosh

Definition in file basic.h.

Macro Definition Documentation

#define _MAX_STRING_SIZE_   500

Maximum size of character strings

Definition at line 14 of file basic.h.

#define IERR   ierr=

Definition at line 16 of file basic.h.

#define _DECLARE_IERR_   int ierr = 0;

Definition at line 17 of file basic.h.

#define CHECKERR (   ierr)    { if (ierr) return(ierr); }

Definition at line 18 of file basic.h.

#define _MACHINE_ZERO_   1.0e-14

Numbers smaller than this will be treated as zero

Definition at line 26 of file basic.h.

#define _GetCoordinate_ (   dir,
  i,
  dim,
  ghosts,
  x,
  coord 
)
Value:
{ \
int arraycounter,offset = 0; \
for (arraycounter = 0; arraycounter < dir; arraycounter++) offset += (dim[arraycounter]+2*ghosts); \
coord = (x[offset+ghosts+i]); \
}

Macro to get the spatial coordinate coord along the dir dimension of a grid point whose index in that dimension is i, in a grid of size dim with ghosts ghost points in each dimension. The array containing the spatial coordinates of the entire grid is x.

Definition at line 31 of file basic.h.

#define _MIN_GRID_PTS_PER_PROC_   4

Minimum number of grid points per dimension per MPI rank

Definition at line 39 of file basic.h.