1 #include "pybind11/pybind11.h"
2 #include "pybind11/stl_bind.h"
4 #define FORCE_IMPORT_ARRAY
7 #if defined(__GNUC__) && !defined(__clang__)
9 inline void define_allocators() {
10 std::allocator<int> a0;
11 std::allocator<double> a1;
16 namespace py = pybind11;
18 using pybind11::return_value_policy;
23 py::class_<SW2DCV_base>(m,
"cSW2DCV_base")
25 .def(
"convexLimiting", &SW2DCV_base::convexLimiting)
26 .def(
"calculateEdgeBasedCFL", &SW2DCV_base::calculateEdgeBasedCFL,
27 return_value_policy::take_ownership)
28 .def(
"calculateEV", &SW2DCV_base::calculateEV)
29 .def(
"calculateResidual", &SW2DCV_base::calculateResidual)
30 .def(
"calculateMassMatrix", &SW2DCV_base::calculateMassMatrix)
31 .def(
"calculateLumpedMassMatrix",
32 &SW2DCV_base::calculateLumpedMassMatrix);