Peka2D_v5  v5.0
Macros
define.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <omp.h>
Include dependency graph for define.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LINUX_COMPILATION   1
 
#define SOLVER   1
 
#define SET_SIMGPU   1
 
#define SET_OPENMP   0
 
#define SET_SOLUTE   1
 
#define RECONSTRUC_ACTIVE   1
 
#define nIterArrangeActElem   200
 
#define BINARY_VTK   1
 
#define APP_MODE   0
 
#define EXPORT_DLL_MODE   0
 
#define EXPORT_DLL
 
#define FT2MFACT   (1/3.2808)
 
#define M2FTFACT   (3.2808)
 
#define LB2KGFACT   (1/2.2046)
 
#define KG2LBFACT   (2.2046)
 
#define FT32M3FACT   ((1/3.2808)*(1/3.2808)*(1/3.2808))
 
#define M32FT3FACT   (3.2808*3.2808*3.2808)
 
#define PSI2PASCFACT   (6894.75729)
 
#define FT22M2FACT   ((1/3.2808)*(1/3.2808))
 
#define BTU2JOULE   (1055.056)
 
#define WRITE_STATE   1
 
#define WRITE_MASS   1
 
#define threadsPerBlock   128
 
#define IBC_WEIR   1
 
#define IBC_GATE   2
 
#define IBC_RATING_TABLE   3
 
#define IBC_DAMBREACH   4
 
#define SIGN(x)   ((x > 0.) - (x < 0.))
 
#define MIN(x, y)   (((x)<(y))?(x):(y))
 
#define MAX(x, y)   (((x)>(y))?(x):(y))
 
#define MINMAX(x, y, z)   (((z) < (x)) ? (x) : (((z) > (y)) ? (y) : (z)))
 
#define CBRT(x)   (cbrt(x))
 
#define MAXHMIN   0.01
 
#define MINHMIN   0.0005
 
#define MAX_ANGLE_HYDRONIA_MESH   15.0
 
#define _X_   0
 
#define _Y_   1
 
#define TOL3   1e-3
 
#define TOL4   1e-4
 
#define TOL5   1e-5
 
#define TOL6   1e-6
 
#define TOL9   1e-9
 
#define TOL12   1e-12
 
#define TOL14   1e-14
 
#define TOL16   1e-16
 
#define _PI_   3.1415926535897
 
#define _g_   9.80665
 
#define _e_   2.71828
 
#define _raizg_   3.1315571206669694
 
#define _atan1_   0.785398163397448
 
#define _dospi_   6.283185307179584
 
#define _rhow_   1000.0
 
#define _nu_   0.00000151
 
#define _cp_   4182.0
 
#define MSG_ERROR   -10
 
#define MSG_WARN   -1
 
#define MSG_L0   0
 
#define MSG_L1   1
 
#define MSG_L2   2
 
#define MSG_L3   3
 
#define DISPLAY   1
 
#define KNRM   "\x1B[0m"
 
#define KRED   "\x1B[31m"
 
#define KGRN   "\x1B[32m"
 
#define KYEL   "\x1B[33m"
 
#define KBLU   "\x1B[34m"
 
#define KMAG   "\x1B[35m"
 
#define KCYN   "\x1B[36m"
 
#define KWHT   "\x1B[37m"
 
#define BOLD   "\x1B[1m"
 
#define BRED   "\x1B[1;31m"
 
#define BGRN   "\x1B[1;32m"
 
#define BYEL   "\x1B[1;33m"
 
#define BBLU   "\x1B[1;34m"
 
#define BMAG   "\x1B[1;35m"
 
#define BCYN   "\x1B[1;36m"
 
#define BWHT   "\x1B[1;37m"
 
#define MSGERROR   " \033[1;31m[FAIL]\033[0m "
 
#define MSGOK   " \033[1;32m[_OK_]\033[0m "
 
#define MSGINFO   " \033[1;35m__ii__\033[0m "
 
#define MSGLOAD   " \033[1;36m[LOAD]\033[0m "
 
#define MSGMEMO   " \033[1;34m[MEMO]\033[0m "
 
#define MSGREAD   " \033[1;34m[READ]\033[0m "
 
#define MSGGPU   " \033[1;36m[CUDA]\033[0m "
 
#define MSGEXC   " \033[1;34m[EXEC]\033[0m "
 
#define MSGWARN   " \033[1;33m[WARN]\033[0m "
 
#define DEBUGMSG
 
#define CUT_CHECK_ERROR(errorMessage)
 
#define DUMPDELTAT   0
 
#define DEBUG   0
 
#define DEBUG_READ_BOUNDS   0
 
#define DEBUG_READ_SECTIONS   0
 
#define DEBUG_READ_SOURCES   0
 
#define WRITE_FROUDE   0
 
#define FLUX_LIMITER   0
 
#define functionPhi0(y)   MAX(0.0,MIN(1.0,y))
 
#define functionPhi1(y)   (y*y + y)/(y*y+1)
 
#define functionPhi2(y)   MAX(0.0,(MIN(1.5*y,1.0),MIN(y,1.5)))
 
#define functionPhi(y)   functionPhi0(y)
 
#define HFM_MANNING   0
 
#define HFM_CHEZY   1
 
#define HFM_DW   2
 
#define HYDRO_FRICTION   HGM_MANNING
 

Macro Definition Documentation

◆ _atan1_

#define _atan1_   0.785398163397448

◆ _cp_

#define _cp_   4182.0

◆ _dospi_

#define _dospi_   6.283185307179584

◆ _e_

#define _e_   2.71828

◆ _g_

#define _g_   9.80665

◆ _nu_

#define _nu_   0.00000151

◆ _PI_

#define _PI_   3.1415926535897

◆ _raizg_

#define _raizg_   3.1315571206669694

◆ _rhow_

#define _rhow_   1000.0

◆ _X_

#define _X_   0

◆ _Y_

#define _Y_   1

◆ APP_MODE

#define APP_MODE   0

Indicates the compilation mode. It affects, for instance, to the way the messages are displayed and stored as well as the generation of some outfiles that are not useful when using the GUI APP_MODE == 1 indicates that the code will be genrated using a GUI APP_MODE == 0 indicates that the code is compiled for console

◆ BBLU

#define BBLU   "\x1B[1;34m"

◆ BCYN

#define BCYN   "\x1B[1;36m"

◆ BGRN

#define BGRN   "\x1B[1;32m"

◆ BINARY_VTK

#define BINARY_VTK   1

Enables the generation of VTK files in binary codification 0 Disabled 1 Enabled

◆ BMAG

#define BMAG   "\x1B[1;35m"

◆ BOLD

#define BOLD   "\x1B[1m"

◆ BRED

#define BRED   "\x1B[1;31m"

◆ BTU2JOULE

#define BTU2JOULE   (1055.056)

◆ BWHT

#define BWHT   "\x1B[1;37m"

◆ BYEL

#define BYEL   "\x1B[1;33m"

◆ CBRT

#define CBRT (   x)    (cbrt(x))

◆ CUT_CHECK_ERROR

#define CUT_CHECK_ERROR (   errorMessage)
Value:
do {\
cudaThreadSynchronize();\
cudaError_t err = cudaGetLastError();\
if( cudaSuccess != err) {\
fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n",\
errorMessage, __FILE__, __LINE__, cudaGetErrorString( err) );\
exit(EXIT_FAILURE);\
} } while (0)

◆ DEBUG

#define DEBUG   0

◆ DEBUG_READ_BOUNDS

#define DEBUG_READ_BOUNDS   0

◆ DEBUG_READ_SECTIONS

#define DEBUG_READ_SECTIONS   0

◆ DEBUG_READ_SOURCES

#define DEBUG_READ_SOURCES   0

◆ DEBUGMSG

#define DEBUGMSG
Value:
printf("file '%s' in line %i\n",\
__FILE__, __LINE__ );

◆ DISPLAY

#define DISPLAY   1

◆ DUMPDELTAT

#define DUMPDELTAT   0

◆ EXPORT_DLL

#define EXPORT_DLL

◆ EXPORT_DLL_MODE

#define EXPORT_DLL_MODE   0

Expor DLL mode

◆ FLUX_LIMITER

#define FLUX_LIMITER   0

◆ FT22M2FACT

#define FT22M2FACT   ((1/3.2808)*(1/3.2808))

◆ FT2MFACT

#define FT2MFACT   (1/3.2808)

◆ FT32M3FACT

#define FT32M3FACT   ((1/3.2808)*(1/3.2808)*(1/3.2808))

◆ functionPhi

#define functionPhi (   y)    functionPhi0(y)

◆ functionPhi0

#define functionPhi0 (   y)    MAX(0.0,MIN(1.0,y))

◆ functionPhi1

#define functionPhi1 (   y)    (y*y + y)/(y*y+1)

◆ functionPhi2

#define functionPhi2 (   y)    MAX(0.0,(MIN(1.5*y,1.0),MIN(y,1.5)))

◆ HFM_CHEZY

#define HFM_CHEZY   1

◆ HFM_DW

#define HFM_DW   2

◆ HFM_MANNING

#define HFM_MANNING   0

◆ HYDRO_FRICTION

#define HYDRO_FRICTION   HGM_MANNING

◆ IBC_DAMBREACH

#define IBC_DAMBREACH   4

◆ IBC_GATE

#define IBC_GATE   2

◆ IBC_RATING_TABLE

#define IBC_RATING_TABLE   3

◆ IBC_WEIR

#define IBC_WEIR   1

◆ KBLU

#define KBLU   "\x1B[34m"

◆ KCYN

#define KCYN   "\x1B[36m"

◆ KG2LBFACT

#define KG2LBFACT   (2.2046)

◆ KGRN

#define KGRN   "\x1B[32m"

◆ KMAG

#define KMAG   "\x1B[35m"

◆ KNRM

#define KNRM   "\x1B[0m"

◆ KRED

#define KRED   "\x1B[31m"

◆ KWHT

#define KWHT   "\x1B[37m"

◆ KYEL

#define KYEL   "\x1B[33m"

◆ LB2KGFACT

#define LB2KGFACT   (1/2.2046)

◆ LINUX_COMPILATION

#define LINUX_COMPILATION   1

◆ M2FTFACT

#define M2FTFACT   (3.2808)

◆ M32FT3FACT

#define M32FT3FACT   (3.2808*3.2808*3.2808)

◆ MAX

#define MAX (   x,
 
)    (((x)>(y))?(x):(y))

◆ MAX_ANGLE_HYDRONIA_MESH

#define MAX_ANGLE_HYDRONIA_MESH   15.0

◆ MAXHMIN

#define MAXHMIN   0.01

◆ MIN

#define MIN (   x,
 
)    (((x)<(y))?(x):(y))

◆ MINHMIN

#define MINHMIN   0.0005

◆ MINMAX

#define MINMAX (   x,
  y,
 
)    (((z) < (x)) ? (x) : (((z) > (y)) ? (y) : (z)))

◆ MSG_ERROR

#define MSG_ERROR   -10

◆ MSG_L0

#define MSG_L0   0

◆ MSG_L1

#define MSG_L1   1

◆ MSG_L2

#define MSG_L2   2

◆ MSG_L3

#define MSG_L3   3

◆ MSG_WARN

#define MSG_WARN   -1

◆ MSGERROR

#define MSGERROR   " \033[1;31m[FAIL]\033[0m "

◆ MSGEXC

#define MSGEXC   " \033[1;34m[EXEC]\033[0m "

◆ MSGGPU

#define MSGGPU   " \033[1;36m[CUDA]\033[0m "

◆ MSGINFO

#define MSGINFO   " \033[1;35m__ii__\033[0m "

◆ MSGLOAD

#define MSGLOAD   " \033[1;36m[LOAD]\033[0m "

◆ MSGMEMO

#define MSGMEMO   " \033[1;34m[MEMO]\033[0m "

◆ MSGOK

#define MSGOK   " \033[1;32m[_OK_]\033[0m "

◆ MSGREAD

#define MSGREAD   " \033[1;34m[READ]\033[0m "

◆ MSGWARN

#define MSGWARN   " \033[1;33m[WARN]\033[0m "

◆ nIterArrangeActElem

#define nIterArrangeActElem   200

◆ PSI2PASCFACT

#define PSI2PASCFACT   (6894.75729)

◆ RECONSTRUC_ACTIVE

#define RECONSTRUC_ACTIVE   1

Active elemens arrangement 0 Disabled 1 Enabled

◆ SET_OPENMP

#define SET_OPENMP   0

◆ SET_SIMGPU

#define SET_SIMGPU   1

Enables GPU compilation 0 Disabled 1 Enabled

◆ SET_SOLUTE

#define SET_SOLUTE   1

Enables solutes computation 0 Disabled 1 Enabled

◆ SIGN

#define SIGN (   x)    ((x > 0.) - (x < 0.))

◆ SOLVER

#define SOLVER   1

Selection of the solver 1 SWE-Roe

◆ threadsPerBlock

#define threadsPerBlock   128

◆ TOL12

#define TOL12   1e-12

◆ TOL14

#define TOL14   1e-14

◆ TOL16

#define TOL16   1e-16

◆ TOL3

#define TOL3   1e-3

◆ TOL4

#define TOL4   1e-4

◆ TOL5

#define TOL5   1e-5

◆ TOL6

#define TOL6   1e-6

◆ TOL9

#define TOL9   1e-9

◆ WRITE_FROUDE

#define WRITE_FROUDE   0

◆ WRITE_MASS

#define WRITE_MASS   1

◆ WRITE_STATE

#define WRITE_STATE   1