Merge remote-tracking branch 'origin/master'

This commit is contained in:
Christopher Lackner 2022-09-08 17:48:51 +02:00
commit 81b0599a9e
4 changed files with 21 additions and 6 deletions

View File

@ -69,10 +69,10 @@ extern double ComputeCylinderRadius (const Vec3d & n1, const Vec3d & n2,
double h1, double h2);
/// 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]
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]
DLL_HEADER double MinDistTP2 (const Point3d & tp1, const Point3d & tp2,

View File

@ -668,6 +668,11 @@ namespace netgen
for (auto pi : points_range)
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();
static Timer taddseg("addseg");

View File

@ -339,6 +339,9 @@ namespace netgen
if (swapped[t1])
return;
if(mesh[t1].GetNP() != 3)
return;
if (multithread.terminate)
throw NgException ("Meshing stopped");

View File

@ -756,10 +756,17 @@ namespace netgen
{
for (auto & se : mesh.SurfaceElements())
if (se.GetNP() != 3)
{
for(auto pi : se.PNums())
if(mesh[pi].Type() == SURFACEPOINT)
{
mixed = true;
break;
}
if(mixed)
break;
}
const auto & getDofs = [&] (int i)
{
return elementsonpoint[i+PointIndex::BASE];