HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
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

◆ _MAX_STRING_SIZE_

#define _MAX_STRING_SIZE_   500

Maximum size of character strings

Definition at line 14 of file basic.h.

◆ IERR

#define IERR   ierr=

Definition at line 16 of file basic.h.

◆ _DECLARE_IERR_

#define _DECLARE_IERR_   int ierr = 0;

Definition at line 17 of file basic.h.

◆ CHECKERR

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

Definition at line 18 of file basic.h.

◆ _MACHINE_ZERO_

#define _MACHINE_ZERO_   1.0e-14

Numbers smaller than this will be treated as zero

Definition at line 26 of file basic.h.

◆ _GetCoordinate_

#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.

◆ _MIN_GRID_PTS_PER_PROC_

#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.