Skip to content

Commit

Permalink
Fixed AddedMass
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Jan 24, 2020
1 parent 963e25d commit 39cc52f
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 410 deletions.
32 changes: 32 additions & 0 deletions proteus/mprans/AddedMass.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#define FORCE_IMPORT_ARRAY
#include "AddedMass.h"

namespace py = pybind11;

namespace xt
{
#if defined(__GNUC__) && !defined(__clang__)
namespace workaround
{
inline void complex_allocator()
{
std::allocator<int> ai;
std::allocator<double> ad;
}
}
#endif
}

PYBIND11_MODULE(cAddedMass, m)
{
using proteus::cppAddedMass_base;
using proteus::newAddedMass;

xt::import_numpy();

py::class_<cppAddedMass_base>(m, "cppAddedMass_base")
.def("calculateResidual", &cppAddedMass_base::calculateResidual)
.def("calculateJacobian", &cppAddedMass_base::calculateJacobian);

m.def("newAddedMass", newAddedMass);
}
Loading

0 comments on commit 39cc52f

Please sign in to comment.