Skip to content
Snippets Groups Projects
Commit 5bec67f9 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Adapt python bindings

parent 8151da04
No related branches found
No related tags found
1 merge request!233Add communicator interface
......@@ -31,7 +31,7 @@
//! \author Henry Korb
//=======================================================================================
#include <pybind11/pybind11.h>
#include <gpu/VirtualFluids_GPU/Communication/Communicator.h>
#include <gpu/VirtualFluids_GPU/Communication/MpiCommunicator.h>
namespace communicator
{
......@@ -39,9 +39,9 @@ namespace communicator
void makeModule(py::module_ &parentModule)
{
py::class_<vf::gpu::Communicator, std::unique_ptr<vf::gpu::Communicator, py::nodelete>>(parentModule, "Communicator")
.def_static("get_instance", &vf::gpu::Communicator::getInstance, py::return_value_policy::reference)
.def("get_number_of_process", &vf::gpu::Communicator::getNumberOfProcess)
.def("get_pid", &vf::gpu::Communicator::getPID);
py::class_<vf::gpu::MpiCommunicator, std::unique_ptr<vf::gpu::MpiCommunicator, py::nodelete>>(parentModule, "Communicator")
.def_static("get_instance", &vf::gpu::MpiCommunicator::getInstance, py::return_value_policy::reference)
.def("get_number_of_process", &vf::gpu::MpiCommunicator::getNumberOfProcess)
.def("get_pid", &vf::gpu::MpiCommunicator::getPID);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment