[688] | 1 | #define DBL REAL(C_DOUBLE) |
---|
| 2 | #define FLT REAL(C_FLOAT) |
---|
| 3 | #define TIME DBL |
---|
| 4 | |
---|
[744] | 5 | #ifdef CPP_MIXED_PREC |
---|
| 6 | #define NUM FLT |
---|
| 7 | #define MPI_NUM MPI_REAL4 |
---|
| 8 | #else |
---|
[688] | 9 | #define NUM DBL |
---|
| 10 | #define MPI_NUM MPI_REAL8 |
---|
| 11 | #endif |
---|
| 12 | |
---|
| 13 | ! NUM and MPI_NUM are used for physical quantities (scalar or array) |
---|
| 14 | ! DBL and MPI_REAL8 are used for variables that always require double precision |
---|
| 15 | |
---|
| 16 | #define NUM1(m) NUM, DIMENSION(m) |
---|
| 17 | #define NUM2(m,n) NUM, DIMENSION(m,n) |
---|
| 18 | #define NUM3(m,n,p) NUM, DIMENSION(m,n,p) |
---|
| 19 | #define NUM4(m,n,p,q) NUM, DIMENSION(m,n,p,q) |
---|
| 20 | #define INDEX INTEGER(C_INT) |
---|
| 21 | |
---|
| 22 | #define FIELD_PS NUM1(primal_num) |
---|
| 23 | #define FIELD_MASS NUM2(llm, primal_num) |
---|
| 24 | #define FIELD_Z NUM2(llm, dual_num) |
---|
| 25 | #define FIELD_U NUM2(llm, edge_num) |
---|
| 26 | #define FIELD_UL NUM2(llm+1, edge_num) |
---|
| 27 | #define FIELD_THETA NUM3(llm, primal_num, nqdyn) |
---|
| 28 | #define FIELD_GEOPOT NUM2(llm+1, primal_num) |
---|
| 29 | |
---|
| 30 | #define BINDC_(thename) BIND(C, name=#thename) |
---|
| 31 | #define BINDC(thename) BINDC_(dynamico_ ## thename) |
---|
[796] | 32 | |
---|
| 33 | #define INDICES1 ij,l,iq,iedge,edge,ivertex,vertex,ij_left,ij_right |
---|
| 34 | #define INDICES2 ij_up,ij_down,itrisk,edge_trisk,kup,kdown |
---|
| 35 | #define EDGES edge1,edge2,edge3,edge4,edge5,edge6 |
---|
| 36 | #define VERTICES vertex1,vertex2,vertex3,vertex4,vertex5,vertex6 |
---|
| 37 | #define SIGNS sign1,sign2,sign3,sign4,sign5,sign6 |
---|
| 38 | #define EDGE_ENDS ij_up1,ij_up2,ij_up3,ij_up4,ij_up5,ij_up6,ij_down1,ij_down2,ij_down3,ij_down4,ij_down5,ij_down6 |
---|
| 39 | #define LENGTHS le_de1,le_de2,le_de3,le_de4,le_de5,le_de6 |
---|
| 40 | #define DECLARE_INDICES INTEGER INDICES1,INDICES2 |
---|
| 41 | #define DECLARE_EDGES NUM SIGNS,LENGTHS ; INTEGER EDGES, EDGE_ENDS |
---|
| 42 | #define DECLARE_VERTICES INTEGER VERTICES |
---|
| 43 | |
---|
| 44 | #define START_TRACE(id,nprimal,ndual,nedge) CALL enter_trace(id, 8*llm*((nprimal)*primal_num+(ndual)*dual_num+(nedge)*edge_num) ) |
---|
| 45 | #define STOP_TRACE CALL exit_trace() |
---|
| 46 | |
---|