facet curving using GeomInfo, adding overrides

This commit is contained in:
Joachim Schöberl 2019-06-03 09:04:33 +02:00
parent b34f0b5333
commit bc836f87ef
5 changed files with 26 additions and 20 deletions

View File

@ -51,11 +51,11 @@ namespace netgen
MeshOptimize2dSurfaces (const CSGeometry & ageometry);
///
virtual void ProjectPoint (INDEX surfind, Point<3> & p) const;
virtual void ProjectPoint (INDEX surfind, Point<3> & p) const override;
///
virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const;
virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const override;
///
virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const;
virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const override;
};
@ -72,24 +72,24 @@ namespace netgen
int surfi,
const PointGeomInfo & gi1,
const PointGeomInfo & gi2,
Point<3> & newp, PointGeomInfo & newgi) const;
Point<3> & newp, PointGeomInfo & newgi) const override;
virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint,
int surfi1, int surfi2,
const EdgePointGeomInfo & ap1,
const EdgePointGeomInfo & ap2,
Point<3> & newp, EdgePointGeomInfo & newgi) const;
Point<3> & newp, EdgePointGeomInfo & newgi) const override;
virtual Vec<3> GetTangent (const Point<3> & p, int surfi1, int surfi2,
const EdgePointGeomInfo & ap1) const;
const EdgePointGeomInfo & ap1) const override;
virtual Vec<3> GetNormal (const Point<3> & p, int surfi1,
const PointGeomInfo & gi) const;
const PointGeomInfo & gi) const override;
virtual void ProjectToSurface (Point<3> & p, int surfi) const;
virtual void ProjectToSurface (Point<3> & p, int surfi) const override;
virtual void ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const;
virtual void ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const override;
};

View File

@ -72,7 +72,7 @@ public:
virtual void ProjectToSurface (Point<3> & p, int surfi) const;
virtual void ProjectToSurface (Point<3> & p, int surfi, const PointGeomInfo & /* gi */) const
virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & /* gi */) const
{
ProjectToSurface (p, surfi);
}

View File

@ -732,6 +732,7 @@ namespace netgen
if (mesh.GetDimension() == 3 || rational)
{
static Timer tce("curve edges"); RegionTimer reg(tce);
Array<int> surfnr(nedges);
Array<PointGeomInfo> gi0(nedges);
Array<PointGeomInfo> gi1(nedges);
@ -1206,7 +1207,8 @@ namespace netgen
#endif
if (mesh.GetDimension() == 3 && working)
{
{
static Timer tcf("curve faces"); RegionTimer reg(tcf);
for (int f = 0; f < nfaces; f++)
{
int facenr = f;
@ -1293,7 +1295,11 @@ namespace netgen
Point<3> pp = xa[jj];
// ref -> ProjectToSurface (pp, mesh.GetFaceDescriptor(el.GetIndex()).SurfNr());
ref -> ProjectToSurface (pp, surfnr[facenr]);
SurfaceElementIndex sei = top.GetFace2SurfaceElement (f+1)-1;
PointGeomInfo gi = mesh[sei].GeomInfoPi(1);
ref -> ProjectToSurface (pp, surfnr[facenr], gi);
Vec<3> dist = pp-xa[jj];
CalcTrigShape (order1, lami[fnums[1]]-lami[fnums[0]],

View File

@ -182,17 +182,17 @@ public:
int surfi,
const PointGeomInfo & gi1,
const PointGeomInfo & gi2,
Point<3> & newp, PointGeomInfo & newgi) const;
Point<3> & newp, PointGeomInfo & newgi) const override;
virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint,
int surfi1, int surfi2,
const EdgePointGeomInfo & ap1,
const EdgePointGeomInfo & ap2,
Point<3> & newp, EdgePointGeomInfo & newgi) const;
Point<3> & newp, EdgePointGeomInfo & newgi) const override;
virtual void ProjectToSurface (Point<3> & p, int surfi) const;
virtual void ProjectToSurface (Point<3> & p, int surfi) const override;
virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const;
virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const override;
};

View File

@ -103,16 +103,16 @@ public:
int surfi,
const PointGeomInfo & gi1,
const PointGeomInfo & gi2,
Point<3> & newp, PointGeomInfo & newgi) const;
Point<3> & newp, PointGeomInfo & newgi) const override;
virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint,
int surfi1, int surfi2,
const EdgePointGeomInfo & ap1,
const EdgePointGeomInfo & ap2,
Point<3> & newp, EdgePointGeomInfo & newgi) const;
Point<3> & newp, EdgePointGeomInfo & newgi) const override;
virtual void ProjectToSurface (Point<3> & p, int surfi) const;
virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const;
virtual void ProjectToSurface (Point<3> & p, int surfi) const override;
virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const override;
};