Skip to content

Commit

Permalink
boost->pybind11
Browse files Browse the repository at this point in the history
  • Loading branch information
chemiskyy committed Jan 25, 2024
1 parent 3828c3a commit 2f04f56
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>

#include <carma>
#include <armadillo>
#include <boost/python.hpp>
#include <boost/python/numpy.hpp>
#include <simcoon/arma2numpy/numpy_arma.hpp>

#include <simcoon/Simulation/Solver/read.hpp>
#include <simcoon/Simulation/Solver/solver.hpp>
#include <simcoon/python_wrappers/Libraries/Solver/solver.hpp>

namespace bn = boost::python::numpy;
namespace bp = boost::python;
using namespace std;
using namespace arma;
using namespace arma2numpy;
namespace py=pybind11;

namespace simpy {

//This function computes the response of materials for an homogeneous mixed thermomechanical loading path
void solver(const std::string &umat_name_py, const bn::ndarray &props_py, const int &nstatev, const double &psi_rve, const double &theta_rve, const double &phi_rve, const int &solver_type, const int &corate_type, const std::string &path_data_py, const std::string &path_results_py, const std::string &pathfile_py, const std::string &outputfile_py) {
void solver(const std::string &umat_name_py, const py::array_t<double> &props_py, const int &nstatev, const double &psi_rve, const double &theta_rve, const double &phi_rve, const int &solver_type, const int &corate_type, const std::string &path_data_py, const std::string &path_results_py, const std::string &pathfile_py, const std::string &outputfile_py) {

vec props = array2vec(props_py);

// std::string umat_name = bp::extract<std::string>(umat_name_py);
// std::string path_data = bp::extract<std::string>(path_data_py);
// std::string path_results = bp::extract<std::string>(path_results_py);
// std::string pathfile = bp::extract<std::string>(pathfile_py);
// std::string outputfile = bp::extract<std::string>(outputfile_py);
vec props = carma::arr_to_col(props_py);

double div_tnew_dt_solver = 0.5;
double mul_tnew_dt_solver = 2.;
Expand Down

0 comments on commit 2f04f56

Please sign in to comment.