mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
enable meshing parameters for OptimizeMesh2d
This commit is contained in:
parent
41d9fbf258
commit
ea9c0cf524
@ -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