proteus  1.8.1
C/C++/Fortran libraries
SW2D.cpp
Go to the documentation of this file.
1 #include "pybind11/pybind11.h"
2 #include "pybind11/stl_bind.h"
3 
4 #define FORCE_IMPORT_ARRAY
5 #include "SW2D.h"
6 
7 #if defined(__GNUC__) && !defined(__clang__)
8  namespace workaround
9  {
10  inline void define_allocators()
11  {
12  std::allocator<int> a0;
13  std::allocator<double> a1;
14  }
15  }
16 #endif
17 
18 namespace py = pybind11;
19 using proteus::SW2D_base;
20 
21 PYBIND11_MODULE(cSW2D, m)
22 {
23  xt::import_numpy();
24 
25  py::class_<SW2D_base>(m, "cSW2D_base")
27  .def("calculateResidual" , &SW2D_base::calculateResidual)
28  .def("calculateJacobian" , &SW2D_base::calculateJacobian)
29  .def("calculateResidual_supg" , &SW2D_base::calculateResidual_supg)
30  .def("calculateJacobian_supg" , &SW2D_base::calculateJacobian_supg);
31 }
proteus::newSW2D
SW2D_base * newSW2D(int nSpaceIn, int nQuadraturePoints_elementIn, int nDOF_mesh_trial_elementIn, int nDOF_trial_elementIn, int nDOF_test_elementIn, int nQuadraturePoints_elementBoundaryIn, int CompKernelFlag)
Definition: SW2D.h:4013
PYBIND11_MODULE
PYBIND11_MODULE(cSW2D, m)
Definition: SW2D.cpp:21
init
void init(void)
SW2D.h
proteus::SW2D_base
Definition: SW2D.h:20