really interpolate only tangential part...

This commit is contained in:
Christopher Lackner 2022-03-01 14:56:01 +01:00
parent 13a0b78e26
commit e8c9d8e1fc
3 changed files with 5 additions and 7 deletions

View File

@ -239,13 +239,14 @@ namespace netgen
std::map<PointIndex, double> weights;
for(auto pi : surface_points)
{
dmesh.AddPoint(pi, &weights);
dmesh.CalcIntersecting(pi);
dmesh.CalcWeights(pi, weights);
auto & v = growthvectors[pi];
auto n = 1./v.Length() * v;
for(auto & [pi_other, weight] : weights)
{
auto t = weight * growthvectors[pi_other];
t -= (t * n) * t;
t -= (t * n) * n;
v += t;
}
}

View File

@ -315,15 +315,12 @@ namespace netgen
weight *= isum;
}
void DelaunayMesh::AddPoint( PointIndex pi_new, std::map<PointIndex, double> * weights )
void DelaunayMesh::AddPoint( PointIndex pi_new)
{
static Timer t("AddPoint"); RegionTimer reg(t);
CalcIntersecting(pi_new);
if(weights)
CalcWeights(pi_new, *weights);
for (int j : intersecting)
{
UnsetNeighbours(j);

View File

@ -66,7 +66,7 @@ namespace netgen
void CalcIntersecting( PointIndex pi_new );
void CalcWeights( PointIndex pi_new, std::map<PointIndex, double> & weights );
void AddPoint( PointIndex pi_new, std::map<PointIndex, double> * weights = nullptr );
void AddPoint( PointIndex pi_new );
Array<DelaunayTrig> & GetElements() { return trigs; }
};