mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
Timers, cleanup in delaunay
This commit is contained in:
parent
39acabe406
commit
17af3d0091
@ -795,17 +795,16 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove flat tets containing two adjacent surface trigs
|
// Remove flat tets containing two adjacent surface trigs
|
||||||
NgArray<int> DelaunayRemoveTwoTriaTets( const Mesh & mesh, NgArray<DelaunayTet> & tempels )
|
void DelaunayRemoveTwoTriaTets( const Mesh & mesh, NgArray<DelaunayTet> & tempels, NgArray<int> & openels )
|
||||||
{
|
{
|
||||||
static Timer topenel("Delaunay - find openel");
|
static Timer topenel("Delaunay - find openel"); RegionTimer rt(topenel);
|
||||||
topenel.Start();
|
|
||||||
|
|
||||||
auto np = mesh.GetNP();
|
auto np = mesh.GetNP();
|
||||||
|
|
||||||
// find surface triangles which are no face of any tet
|
// find surface triangles which are no face of any tet
|
||||||
|
|
||||||
INDEX_3_HASHTABLE<int> openeltab(mesh.GetNOpenElements()+3);
|
INDEX_3_HASHTABLE<int> openeltab(mesh.GetNOpenElements()+3);
|
||||||
NgArray<int> openels;
|
openels.SetSize(0);
|
||||||
for (int i = 1; i <= mesh.GetNOpenElements(); i++)
|
for (int i = 1; i <= mesh.GetNOpenElements(); i++)
|
||||||
{
|
{
|
||||||
const Element2d & tri = mesh.OpenElement(i);
|
const Element2d & tri = mesh.OpenElement(i);
|
||||||
@ -837,9 +836,6 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// find open triangle with close edge (from halfening of surface squares)
|
// find open triangle with close edge (from halfening of surface squares)
|
||||||
|
|
||||||
INDEX_2_HASHTABLE<INDEX_2> twotrias(mesh.GetNOpenElements()+5);
|
INDEX_2_HASHTABLE<INDEX_2> twotrias(mesh.GetNOpenElements()+5);
|
||||||
@ -931,16 +927,11 @@ namespace netgen
|
|||||||
badnode.Test(el[3]) )
|
badnode.Test(el[3]) )
|
||||||
tempels.DeleteElement(i);
|
tempels.DeleteElement(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
topenel.Stop();
|
|
||||||
|
|
||||||
return openels;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DelaunayRemoveIntersecting( const Mesh & mesh, NgArray<DelaunayTet> & tempels, NgArray<int> & openels, Point3d pmin, Point3d pmax )
|
void DelaunayRemoveIntersecting( const Mesh & mesh, NgArray<DelaunayTet> & tempels, NgArray<int> & openels, Point3d pmin, Point3d pmax )
|
||||||
{
|
{
|
||||||
static Timer trem_intersect("Delaunay - remove intersecting"); RegionTimert(trem_intersect);
|
static Timer trem_intersect("Delaunay - remove intersecting"); RegionTimer rt(trem_intersect);
|
||||||
|
|
||||||
// find intersecting:
|
// find intersecting:
|
||||||
PrintMessage (3, "Remove intersecting");
|
PrintMessage (3, "Remove intersecting");
|
||||||
@ -1633,7 +1624,9 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
DelaunayRemoveDegenerated(mesh.Points(), tempels);
|
DelaunayRemoveDegenerated(mesh.Points(), tempels);
|
||||||
auto openels = DelaunayRemoveTwoTriaTets(mesh, tempels);
|
|
||||||
|
NgArray<int> openels;
|
||||||
|
DelaunayRemoveTwoTriaTets(mesh, tempels, openels);
|
||||||
DelaunayRemoveIntersecting(mesh, tempels, openels, pmin, pmax);
|
DelaunayRemoveIntersecting(mesh, tempels, openels, pmin, pmax);
|
||||||
DelaunayRemoveOuter(mesh, tempels, adfront);
|
DelaunayRemoveOuter(mesh, tempels, adfront);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user