mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
Merge branch 'visualize_failed_mesh' into 'master'
visualized failed mesh after generatemesh See merge request ngsolve/netgen!513
This commit is contained in:
commit
ec0fc05fd6
@ -586,6 +586,8 @@ namespace netgen
|
|||||||
|
|
||||||
auto md = DivideMesh(mesh3d, mp);
|
auto md = DivideMesh(mesh3d, mp);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
ParallelFor( md.Range(), [&](int i)
|
ParallelFor( md.Range(), [&](int i)
|
||||||
{
|
{
|
||||||
if (mp.checkoverlappingboundary)
|
if (mp.checkoverlappingboundary)
|
||||||
@ -597,6 +599,12 @@ namespace netgen
|
|||||||
CloseOpenQuads( md[i] );
|
CloseOpenQuads( md[i] );
|
||||||
MeshDomain(md[i]);
|
MeshDomain(md[i]);
|
||||||
}, md.Size());
|
}, md.Size());
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
MergeMeshes(mesh3d, md);
|
||||||
|
return MESHING3_GIVEUP;
|
||||||
|
}
|
||||||
|
|
||||||
MergeMeshes(mesh3d, md);
|
MergeMeshes(mesh3d, md);
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ using namespace netgen;
|
|||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
extern std::shared_ptr<NetgenGeometry> ng_geometry;
|
extern std::shared_ptr<NetgenGeometry> ng_geometry;
|
||||||
|
extern std::shared_ptr<Mesh> mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
static string occparameter_description = R"delimiter(
|
static string occparameter_description = R"delimiter(
|
||||||
@ -272,7 +273,10 @@ DLL_HEADER void ExportNgOCC(py::module &m)
|
|||||||
SetGlobalMesh(mesh);
|
SetGlobalMesh(mesh);
|
||||||
auto result = geo->GenerateMesh(mesh, mp);
|
auto result = geo->GenerateMesh(mesh, mp);
|
||||||
if(result != 0)
|
if(result != 0)
|
||||||
throw Exception("Meshing failed!");
|
{
|
||||||
|
netgen::mesh = mesh; // keep mesh for debugging
|
||||||
|
throw Exception("Meshing failed!");
|
||||||
|
}
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
if (comm.Size() > 1)
|
if (comm.Size() > 1)
|
||||||
mesh->Distribute();
|
mesh->Distribute();
|
||||||
|
Loading…
Reference in New Issue
Block a user