mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
Merge branch 'opt2d_mp' into 'master'
enable meshing parameters for OptimizeMesh2d See merge request jschoeberl/netgen!432
This commit is contained in:
commit
b40e71575c
@ -994,15 +994,16 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
OptimizeVolume (mp, self);
|
OptimizeVolume (mp, self);
|
||||||
}, py::arg("mp"), py::call_guard<py::gil_scoped_release>())
|
}, py::arg("mp"), py::call_guard<py::gil_scoped_release>())
|
||||||
|
|
||||||
.def ("OptimizeMesh2d", [](Mesh & self)
|
.def ("OptimizeMesh2d", [](Mesh & self, MeshingParameters* pars)
|
||||||
{
|
{
|
||||||
self.CalcLocalH(0.5);
|
self.CalcLocalH(0.5);
|
||||||
MeshingParameters mp;
|
MeshingParameters mp;
|
||||||
mp.optsteps2d = 5;
|
if(pars) mp = *pars;
|
||||||
|
else mp.optsteps2d = 5;
|
||||||
if(!self.GetGeometry())
|
if(!self.GetGeometry())
|
||||||
throw Exception("Cannot optimize surface mesh without geometry!");
|
throw Exception("Cannot optimize surface mesh without geometry!");
|
||||||
Optimize2d (self, mp);
|
Optimize2d (self, mp);
|
||||||
},py::call_guard<py::gil_scoped_release>())
|
}, py::arg("mp")=nullptr, py::call_guard<py::gil_scoped_release>())
|
||||||
|
|
||||||
.def ("Refine", FunctionPointer
|
.def ("Refine", FunctionPointer
|
||||||
([](Mesh & self)
|
([](Mesh & self)
|
||||||
|
Loading…
Reference in New Issue
Block a user