mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40: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);
|
||||
})
|
||||
.def ("GenerateVolumeMesh",
|
||||
[](Mesh & self, py::object pymp)
|
||||
[](Mesh & self, py::kwargs kwargs)
|
||||
{
|
||||
cout << "generate vol mesh" << endl;
|
||||
|
||||
MeshingParameters mp;
|
||||
{
|
||||
py::gil_scoped_acquire acquire;
|
||||
if (py::extract<MeshingParameters>(pymp).check())
|
||||
mp = py::extract<MeshingParameters>(pymp)();
|
||||
else
|
||||
{
|
||||
mp.optsteps3d = 5;
|
||||
}
|
||||
mp = CreateMPfromKwargs(kwargs);
|
||||
}
|
||||
MeshVolume (mp, self);
|
||||
OptimizeVolume (mp, self);
|
||||
},
|
||||
py::arg("mp")=NGDummyArgument(),py::call_guard<py::gil_scoped_release>())
|
||||
}, meshingparameter_description.c_str(),
|
||||
py::call_guard<py::gil_scoped_release>())
|
||||
|
||||
.def ("OptimizeVolumeMesh", [](Mesh & self)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ def test_pickle_occ():
|
||||
except:
|
||||
import pytest
|
||||
pytest.skip("can't import occ")
|
||||
geo = OCCGeometry("../../tutorials/frame.step")
|
||||
geo = occ.OCCGeometry("../../tutorials/frame.step")
|
||||
geo_dump = pickle.dumps(geo)
|
||||
geo2 = pickle.loads(geo_dump)
|
||||
vd1 = geo._visualizationData()
|
||||
|
Loading…
Reference in New Issue
Block a user