mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
Receive Mesh from python as static method
This commit is contained in:
parent
d6f1cf2bda
commit
fbe660f775
@ -576,12 +576,12 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
else self->SendRecvMesh();
|
||||
return self;
|
||||
}, py::arg("comm"))
|
||||
.def("Receive", [](NgMPI_Comm comm) {
|
||||
.def_static("Receive", [](NgMPI_Comm comm) -> shared_ptr<Mesh> {
|
||||
auto mesh = make_shared<Mesh>();
|
||||
mesh->SetCommunicator(comm);
|
||||
mesh->SendRecvMesh();
|
||||
return mesh;
|
||||
})
|
||||
}, py::arg("comm"))
|
||||
.def("Load", FunctionPointer
|
||||
([](shared_ptr<Mesh> self, const string & filename)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user