Afivo
0.3
Toggle main menu visibility
Main Page
Related Pages
Modules
Modules List
Module Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
Functions/Subroutines
a
b
c
d
e
f
g
h
i
m
n
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
h
i
k
l
m
n
r
s
t
u
Data Types List
Data Types List
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions/Subroutines
a
d
g
h
i
m
r
s
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Examples
•
All
Classes
Namespaces
Functions
Variables
Pages
src
cpp_macros.h
1
#ifdef __GFORTRAN__
2
#define PASTE(a) a
3
#define CONCAT(a,b) PASTE(a)b
4
#else
5
#define PASTE(a) a ## b
6
#define CONCAT(a,b) PASTE(a,b)
7
#endif
8
9
#if NDIM == 1
10
#define DTIMES(TXT) TXT
11
#define DINDEX(TXT) TXT(1)
12
#define DSLICE(lo,hi) lo(1):hi(1)
13
#define KJI_DO(lo,hi) i = lo, hi
14
#define CLOSE_DO
15
#define IJK i
16
#define IJK_(s) CONCAT(i_,s)
17
#define DIMNAME "1d"
18
#elif NDIM == 2
19
#define DTIMES(TXT) TXT, TXT
20
#define DINDEX(TXT) TXT(1), TXT(2)
21
#define DSLICE(lo,hi) lo(1):hi(1), lo(2):hi(2)
22
#define KJI_DO(lo,hi) j = lo, hi; do i = lo, hi
23
#define CLOSE_DO end do
24
#define IJK i, j
25
#define IJK_(s) CONCAT(i_,s), CONCAT(j_,s)
26
#define DIMNAME "2d"
27
#elif NDIM == 3
28
#define DTIMES(TXT) TXT, TXT, TXT
29
#define DINDEX(TXT) TXT(1), TXT(2), TXT(3)
30
#define DSLICE(lo,hi) lo(1):hi(1), lo(2):hi(2), lo(3):hi(3)
31
#define KJI_DO(lo,hi) k = lo, hi; do j = lo, hi; do i = lo, hi
32
#define CLOSE_DO end do; end do
33
#define IJK i, j, k
34
#define IJK_(s) CONCAT(i_,s), CONCAT(j_,s), CONCAT(k_,s)
35
#define DIMNAME "3d"
36
#endif
Generated on Sat Mar 1 2025 05:02:04 for Afivo by
1.9.4