Select Git revision
lulesh.h
-
Martí Torrents authoredMartí Torrents authored
lulesh.h 19.03 KiB
#if !defined(USE_MPI)
# error "You should specify USE_MPI=0 or USE_MPI=1 on the compile line"
#endif
// OpenMP will be compiled in if this flag is set to 1 AND the compiler beging
// used supports it (i.e. the _OPENMP symbol is defined)
#define USE_OMP 1
#if USE_MPI
#include <mpi.h>
/*
define one of these three symbols:
SEDOV_SYNC_POS_VEL_NONE
SEDOV_SYNC_POS_VEL_EARLY
SEDOV_SYNC_POS_VEL_LATE
*/
#define SEDOV_SYNC_POS_VEL_EARLY 1
#endif
#include <math.h>
#include <vector>
//**************************************************
// Allow flexibility for arithmetic representations
//**************************************************
#define MAX(a, b) ( ((a) > (b)) ? (a) : (b))
// Precision specification
typedef float real4 ;
typedef double real8 ;
typedef long double real10 ; // 10 bytes on x86
typedef int Index_t ; // array subscript and loop index
typedef real8 Real_t ; // floating point representation
typedef int Int_t ; // integer representation
enum { VolumeError = -1, QStopError = -2 } ;
inline real4 SQRT(real4 arg) { return sqrtf(arg) ; }
inline real8 SQRT(real8 arg) { return sqrt(arg) ; }
inline real10 SQRT(real10 arg) { return sqrtl(arg) ; }
inline real4 CBRT(real4 arg) { return cbrtf(arg) ; }
inline real8 CBRT(real8 arg) { return cbrt(arg) ; }
inline real10 CBRT(real10 arg) { return cbrtl(arg) ; }
inline real4 FABS(real4 arg) { return fabsf(arg) ; }
inline real8 FABS(real8 arg) { return fabs(arg) ; }
inline real10 FABS(real10 arg) { return fabsl(arg) ; }
// Stuff needed for boundary conditions
// 2 BCs on each of 6 hexahedral faces (12 bits)
#define XI_M 0x00007
#define XI_M_SYMM 0x00001
#define XI_M_FREE 0x00002
#define XI_M_COMM 0x00004
#define XI_P 0x00038
#define XI_P_SYMM 0x00008
#define XI_P_FREE 0x00010
#define XI_P_COMM 0x00020
#define ETA_M 0x001c0