mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
use CreateMPfromKwargs for mesh.GenerateVolumeMesh as well
This commit is contained in:
parent
da82b72df6
commit
a989babd21
@ -857,24 +857,17 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
self.SetMaxHDomain(maxh);
|
self.SetMaxHDomain(maxh);
|
||||||
})
|
})
|
||||||
.def ("GenerateVolumeMesh",
|
.def ("GenerateVolumeMesh",
|
||||||
[](Mesh & self, py::object pymp)
|
[](Mesh & self, py::kwargs kwargs)
|
||||||
{
|
{
|
||||||
cout << "generate vol mesh" << endl;
|
|
||||||
|
|
||||||
MeshingParameters mp;
|
MeshingParameters mp;
|
||||||
{
|
{
|
||||||
py::gil_scoped_acquire acquire;
|
py::gil_scoped_acquire acquire;
|
||||||
if (py::extract<MeshingParameters>(pymp).check())
|
mp = CreateMPfromKwargs(kwargs);
|
||||||
mp = py::extract<MeshingParameters>(pymp)();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mp.optsteps3d = 5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
MeshVolume (mp, self);
|
MeshVolume (mp, self);
|
||||||
OptimizeVolume (mp, self);
|
OptimizeVolume (mp, self);
|
||||||
},
|
}, meshingparameter_description.c_str(),
|
||||||
py::arg("mp")=NGDummyArgument(),py::call_guard<py::gil_scoped_release>())
|
py::call_guard<py::gil_scoped_release>())
|
||||||
|
|
||||||
.def ("OptimizeVolumeMesh", [](Mesh & self)
|
.def ("OptimizeVolumeMesh", [](Mesh & self)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ def test_pickle_occ():
|
|||||||
except:
|
except:
|
||||||
import pytest
|
import pytest
|
||||||
pytest.skip("can't import occ")
|
pytest.skip("can't import occ")
|
||||||
geo = OCCGeometry("../../tutorials/frame.step")
|
geo = occ.OCCGeometry("../../tutorials/frame.step")
|
||||||
geo_dump = pickle.dumps(geo)
|
geo_dump = pickle.dumps(geo)
|
||||||
geo2 = pickle.loads(geo_dump)
|
geo2 = pickle.loads(geo_dump)
|
||||||
vd1 = geo._visualizationData()
|
vd1 = geo._visualizationData()
|
||||||
|
Loading…
Reference in New Issue
Block a user