DAFoam
v3.0.6
Discrete Adjoint with OpenFOAM
Main Page
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
Related Functions
Files
File List
File Members
All
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Functions
a
c
d
e
f
h
i
l
m
p
r
s
t
u
v
w
Variables
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
Macros
a
c
m
n
p
s
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Macros
dafoam
src
include
setArgs.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
3
DAFoam : Discrete Adjoint with OpenFOAM
4
Version : v3
5
6
Description:
7
Set the arguments for wrapping OpenFOAM with Cython.
8
For an OpenFOAM lib, we only pass the argsAll parameter, so here we need
9
to convert argsAll to argv and argc for the main function
10
11
\*---------------------------------------------------------------------------*/
12
13
// create argc and argv, given argsAll
14
List<word>
argvList
;
15
16
char
*
pch
;
17
pch
= strtok(argsAll_,
" "
);
18
int
argc
= 0;
19
while
(
pch
!= NULL)
20
{
21
argc
++;
22
argvList
.append(
pch
);
23
pch
= strtok(NULL,
" "
);
24
}
25
26
char
**
argv
=
new
char
*[
argc
];
27
for
(
int
i = 0; i <
argc
; i++)
28
{
29
argv
[i] =
const_cast<
char
*
>
(
argvList
[i].c_str());
30
}
argvList
List< word > argvList
Definition:
setArgs.H:14
argc
int argc
Definition:
setArgs.H:18
pch
char * pch
Definition:
setArgs.H:16
argv
char ** argv
Definition:
setArgs.H:26
Generated by
1.8.17