MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
globals.hh
Go to the documentation of this file.
1 
6 #ifndef GLOBALS_H
7 #define GLOBALS_H
8 #define ABS(x) (((x) < 0) ? -(x) : (x))
10 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
12 #define CONFINEX(x) (((x) >= 0) ? (x) % nx : (x) + nx)
14 #define CONFINEY(x) (((x) >= 0) ? (x) % ny : (x) + ny)
16 #define CONFINEZ(x) (((x) >= 0) ? (x) % nz : (x) + nz)
18 #define AMAT(i,j,k) amat[CONFINEX(i)][CONFINEY(j)][CONFINEZ(k)]
20 #define V_CELL(m,i,j,k) v_cell[(m)][CONFINEX(i)][CONFINEY(j)][CONFINEZ(k)]
22 template <typename T> int sgn(T val) {
24  return (T(0) < val) - (val < T(0));
25 }
27 struct fn1_params {int sv; int incmax; int vmax; double **vert; int **vinc; \
28  int ***smat; bool report;};
30 namespace globals {
31  extern bool createNodes;
32  extern bool createEdges;
33  extern bool openCell;
34  extern bool save_dat;
35  extern bool save_vtk;
36  extern double dstrut;
37  extern double dedge;
38  extern double strutPorosity;
39  extern double RANDOM;
44  extern int grid;
45  extern int nx;
46  extern int ny;
47  extern int nz;
48  extern int sx;
49  extern int sy;
50  extern int sz;
51  extern bool save_voro_diag1;
52  extern bool save_voro_diag2;
53  extern bool import_vtk;
54  extern bool progress_report;
55 }
56 #endif
bool openCell
make open cell foam
Definition: globals.cc:9
int grid
Definition: globals.cc:17
bool progress_report
show detailed progress report
Definition: globals.cc:28
double dedge
parameter influencing size of struts in cell edges
Definition: globals.cc:13
int sy
size of cells in Y
Definition: globals.cc:23
bool save_voro_diag1
gnuplot Voronoi diagram
Definition: globals.cc:25
bool createEdges
create struts at cell edges
Definition: globals.cc:8
int sz
size of cells in Z
Definition: globals.cc:24
bool save_vtk
save file in new paraview style
Definition: globals.cc:11
bool save_voro_diag2
alternative gnuplot Voronoi diagram
Definition: globals.cc:26
int sx
size of cells in X
Definition: globals.cc:22
bool save_dat
save file in old dx style
Definition: globals.cc:10
int sgn(T val)
signum
Definition: globals.hh:23
double RANDOM
Definition: globals.cc:15
int nx
domain size in X
Definition: globals.cc:19
bool createNodes
create struts at cell vertices
Definition: globals.cc:7
struct for passing paramaters to GSL function
Definition: globals.hh:27
namespace with global variables
Definition: globals.f90:8
bool import_vtk
import morphology from vtk
Definition: globals.cc:27
double strutPorosity
Definition: globals.cc:14
int ny
domain size in Y
Definition: globals.cc:20