mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
Merge branch 'meshing2d_improvements' into 'master'
faster 2d smoothing for certain mixed meshes See merge request ngsolve/netgen!524
This commit is contained in:
commit
f590c91dbd
@ -69,10 +69,10 @@ extern double ComputeCylinderRadius (const Vec3d & n1, const Vec3d & n2,
|
|||||||
double h1, double h2);
|
double h1, double h2);
|
||||||
|
|
||||||
/// Minimal distance of point p to the line segment [lp1,lp2]
|
/// Minimal distance of point p to the line segment [lp1,lp2]
|
||||||
extern double MinDistLP2 (const Point2d & lp1, const Point2d & lp2, const Point2d & p);
|
DLL_HEADER double MinDistLP2 (const Point2d & lp1, const Point2d & lp2, const Point2d & p);
|
||||||
|
|
||||||
/// Minimal distance of point p to the line segment [lp1,lp2]
|
/// Minimal distance of point p to the line segment [lp1,lp2]
|
||||||
extern double MinDistLP2 (const Point3d & lp1, const Point3d & lp2, const Point3d & p);
|
DLL_HEADER double MinDistLP2 (const Point3d & lp1, const Point3d & lp2, const Point3d & p);
|
||||||
|
|
||||||
/// Minimal distance of point p to the triangle segment [tp1,tp2,pt3]
|
/// Minimal distance of point p to the triangle segment [tp1,tp2,pt3]
|
||||||
DLL_HEADER double MinDistTP2 (const Point3d & tp1, const Point3d & tp2,
|
DLL_HEADER double MinDistTP2 (const Point3d & tp1, const Point3d & tp2,
|
||||||
|
@ -668,6 +668,11 @@ namespace netgen
|
|||||||
for (auto pi : points_range)
|
for (auto pi : points_range)
|
||||||
dmesh.AddPoint(pi);
|
dmesh.AddPoint(pi);
|
||||||
|
|
||||||
|
auto first_new_point = points_range.Next();
|
||||||
|
tempmesh.AddPoint(P3(temp_points[first_new_point]));
|
||||||
|
tempmesh.AddPoint(P3(temp_points[first_new_point+1]));
|
||||||
|
tempmesh.AddPoint(P3(temp_points[first_new_point+2]));
|
||||||
|
|
||||||
timer_addpoints.Stop();
|
timer_addpoints.Stop();
|
||||||
|
|
||||||
static Timer taddseg("addseg");
|
static Timer taddseg("addseg");
|
||||||
|
@ -339,6 +339,9 @@ namespace netgen
|
|||||||
if (swapped[t1])
|
if (swapped[t1])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(mesh[t1].GetNP() != 3)
|
||||||
|
return;
|
||||||
|
|
||||||
if (multithread.terminate)
|
if (multithread.terminate)
|
||||||
throw NgException ("Meshing stopped");
|
throw NgException ("Meshing stopped");
|
||||||
|
|
||||||
|
@ -756,10 +756,17 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
for (auto & se : mesh.SurfaceElements())
|
for (auto & se : mesh.SurfaceElements())
|
||||||
if (se.GetNP() != 3)
|
if (se.GetNP() != 3)
|
||||||
|
{
|
||||||
|
for(auto pi : se.PNums())
|
||||||
|
if(mesh[pi].Type() == SURFACEPOINT)
|
||||||
{
|
{
|
||||||
mixed = true;
|
mixed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(mixed)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
const auto & getDofs = [&] (int i)
|
const auto & getDofs = [&] (int i)
|
||||||
{
|
{
|
||||||
return elementsonpoint[i+PointIndex::BASE];
|
return elementsonpoint[i+PointIndex::BASE];
|
||||||
|
Loading…
Reference in New Issue
Block a user