mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
always merge domains in separate meshes (consistent output)
This commit is contained in:
parent
9488485f22
commit
1cf3d2a21c
@ -278,6 +278,7 @@ namespace netgen
|
|||||||
|
|
||||||
void MergeMeshes( Mesh & mesh, FlatArray<Mesh> meshes, PointIndex first_new_pi )
|
void MergeMeshes( Mesh & mesh, FlatArray<Mesh> meshes, PointIndex first_new_pi )
|
||||||
{
|
{
|
||||||
|
// todo: optimize: count elements, alloc all memory, copy vol elements in parallel
|
||||||
static Timer t("MergeMeshes"); RegionTimer rt(t);
|
static Timer t("MergeMeshes"); RegionTimer rt(t);
|
||||||
for(auto & m : meshes)
|
for(auto & m : meshes)
|
||||||
{
|
{
|
||||||
@ -314,8 +315,6 @@ namespace netgen
|
|||||||
throw NgException ("Stop meshing since boundary mesh is overlapping");
|
throw NgException ("Stop meshing since boundary mesh is overlapping");
|
||||||
|
|
||||||
|
|
||||||
if(task_manager)
|
|
||||||
{
|
|
||||||
Array<Mesh> meshes(mesh3d.GetNDomains()-1);
|
Array<Mesh> meshes(mesh3d.GetNDomains()-1);
|
||||||
auto first_new_pi = mesh3d.Points().Range().Next();
|
auto first_new_pi = mesh3d.Points().Range().Next();
|
||||||
|
|
||||||
@ -333,12 +332,6 @@ namespace netgen
|
|||||||
MeshDomain(meshes[k-2], mp, k);
|
MeshDomain(meshes[k-2], mp, k);
|
||||||
});
|
});
|
||||||
MergeMeshes(mesh3d, meshes, first_new_pi);
|
MergeMeshes(mesh3d, meshes, first_new_pi);
|
||||||
}
|
|
||||||
else
|
|
||||||
for (int k = 1; k <= mesh3d.GetNDomains(); k++)
|
|
||||||
MeshDomain(mesh3d, mp, k);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MeshQuality3d (mesh3d);
|
MeshQuality3d (mesh3d);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user