/
tubex_py_CtcPicard.cpp
50 lines (41 loc) · 1.58 KB
/
tubex_py_CtcPicard.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* \file
* CtcPicard Python binding
* ----------------------------------------------------------------------------
* \date 2020
* \author Simon Rohou, Benoît Desrochers
* \copyright Copyright 2020 Simon Rohou
* \license This program is distributed under the terms of
* the GNU Lesser General Public License (LGPL).
*/
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/operators.h>
#include <pybind11/functional.h>
#include "pyIbex_type_caster.h"
#include "tubex_py_DynCtc.h"
#include "tubex_CtcPicard.h"
// Generated file from Doxygen XML (doxygen2docstring.py):
#include "tubex_py_CtcPicard_docs.h"
using namespace std;
using namespace ibex;
using namespace tubex;
namespace py = pybind11;
using namespace pybind11::literals;
void export_CtcPicard(py::module& m, py::class_<DynCtc, pyDynCtc>& dyn_ctc)
{
py::class_<CtcPicard> ctc_picard(m, "CtcPicard", dyn_ctc, CTCPICARD_MAIN);
ctc_picard
.def(py::init<const TFnc&,float>(),
CTCPICARD_CTCPICARD_TFNC_FLOAT,
"f"_a, "delta"_a=1.1)
.def("contract", (void (CtcPicard::*)(Tube&,TimePropag))&CtcPicard::contract,
CTCPICARD_VOID_CONTRACT_TUBE_TIMEPROPAG,
"x"_a.noconvert(), "t_propa"_a=TimePropag::FORWARD|TimePropag::BACKWARD)
.def("contract", (void (CtcPicard::*)(TubeVector&,TimePropag) )&CtcPicard::contract,
CTCPICARD_VOID_CONTRACT_TUBEVECTOR_TIMEPROPAG,
"x"_a.noconvert(), "t_propa"_a=TimePropag::FORWARD|TimePropag::BACKWARD)
.def("picard_iterations", &CtcPicard::picard_iterations,
CTCPICARD_INT_PICARD_ITERATIONS)
;
}