DAFoam
v3.0.6
Discrete Adjoint with OpenFOAM
dafoam
src
include
setRootCasePython.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
3
DAFoam : Discrete Adjoint with OpenFOAM
4
Version : v3
5
6
7
Description:
8
This is similar to setRootCase.H except we set the last argument
9
initialise=false because we don't want to print the long OpenFOAM header
10
We also add a -python bool option to tell UPstream.C not to call
11
MPI_Finalize because we want mpi4py to call it instead
12
13
This file is modified from OpenFOAM's source code
14
src/OpenFOAM/include/setRootCase.H
15
16
OpenFOAM: The Open Source CFD Toolbox
17
18
Copyright (C): 2011-2016 OpenFOAM Foundation
19
20
OpenFOAM License:
21
22
OpenFOAM is free software: you can redistribute it and/or modify it
23
under the terms of the GNU General Public License as published by
24
the Free Software Foundation, either version 3 of the License, or
25
(at your option) any later version.
26
27
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
28
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
29
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
30
for more details.
31
32
You should have received a copy of the GNU General Public License
33
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
34
35
\*---------------------------------------------------------------------------*/
36
37
Foam::argList::addBoolOption(
"python"
,
"Use Python/Cython wrapping such that the UPstream function \
38
in OpenFOAM will not initialize or finalize MPI, instead, mpi4py will do that."
);
39
40
argsPtr_.reset(
new
Foam::argList(
argc
,
argv
,
true
,
true
,
false
));
41
42
Foam::argList&
args
= argsPtr_();
43
44
if
(!
args
.checkRootCase())
45
{
46
Foam::FatalError.exit();
47
}
argc
int argc
Definition:
setArgs.H:18
args
Foam::argList & args
Definition:
setRootCasePython.H:42
argv
char ** argv
Definition:
setArgs.H:26
Generated by
1.8.17