mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +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;
|
std::map<PointIndex, double> weights;
|
||||||
for(auto pi : surface_points)
|
for(auto pi : surface_points)
|
||||||
{
|
{
|
||||||
dmesh.AddPoint(pi, &weights);
|
dmesh.CalcIntersecting(pi);
|
||||||
|
dmesh.CalcWeights(pi, weights);
|
||||||
auto & v = growthvectors[pi];
|
auto & v = growthvectors[pi];
|
||||||
auto n = 1./v.Length() * v;
|
auto n = 1./v.Length() * v;
|
||||||
for(auto & [pi_other, weight] : weights)
|
for(auto & [pi_other, weight] : weights)
|
||||||
{
|
{
|
||||||
auto t = weight * growthvectors[pi_other];
|
auto t = weight * growthvectors[pi_other];
|
||||||
t -= (t * n) * t;
|
t -= (t * n) * n;
|
||||||
v += t;
|
v += t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,15 +315,12 @@ namespace netgen
|
|||||||
weight *= isum;
|
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);
|
static Timer t("AddPoint"); RegionTimer reg(t);
|
||||||
|
|
||||||
CalcIntersecting(pi_new);
|
CalcIntersecting(pi_new);
|
||||||
|
|
||||||
if(weights)
|
|
||||||
CalcWeights(pi_new, *weights);
|
|
||||||
|
|
||||||
for (int j : intersecting)
|
for (int j : intersecting)
|
||||||
{
|
{
|
||||||
UnsetNeighbours(j);
|
UnsetNeighbours(j);
|
||||||
|
@ -66,7 +66,7 @@ namespace netgen
|
|||||||
|
|
||||||
void CalcIntersecting( PointIndex pi_new );
|
void CalcIntersecting( PointIndex pi_new );
|
||||||
void CalcWeights( PointIndex pi_new, std::map<PointIndex, double> & weights );
|
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; }
|
Array<DelaunayTrig> & GetElements() { return trigs; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user