mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
really interpolate only tangential part...
This commit is contained in:
parent
13a0b78e26
commit
e8c9d8e1fc
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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; }
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user