mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
interpolate only tangential part of growth vector
This commit is contained in:
parent
016b1692e2
commit
13a0b78e26
@ -241,8 +241,13 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
dmesh.AddPoint(pi, &weights);
|
dmesh.AddPoint(pi, &weights);
|
||||||
auto & v = growthvectors[pi];
|
auto & v = growthvectors[pi];
|
||||||
|
auto n = 1./v.Length() * v;
|
||||||
for(auto & [pi_other, weight] : weights)
|
for(auto & [pi_other, weight] : weights)
|
||||||
v += weight * growthvectors[pi_other];
|
{
|
||||||
|
auto t = weight * growthvectors[pi_other];
|
||||||
|
t -= (t * n) * t;
|
||||||
|
v += t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -341,8 +346,6 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
for(auto pi : sel.PNums())
|
for(auto pi : sel.PNums())
|
||||||
{
|
{
|
||||||
if(interpolate_growth_vectors && mesh[pi].Type() >= SURFACEPOINT)
|
|
||||||
continue;
|
|
||||||
auto & np = growthvectors[pi];
|
auto & np = growthvectors[pi];
|
||||||
if(np.Length() == 0) { np = n; continue; }
|
if(np.Length() == 0) { np = n; continue; }
|
||||||
auto npn = np * n;
|
auto npn = np * n;
|
||||||
@ -436,8 +439,6 @@ namespace netgen
|
|||||||
for(auto i : Range(sel.PNums()))
|
for(auto i : Range(sel.PNums()))
|
||||||
{
|
{
|
||||||
auto pi = sel.PNums()[i];
|
auto pi = sel.PNums()[i];
|
||||||
if(interpolate_growth_vectors && mesh[pi].Type() >= SURFACEPOINT)
|
|
||||||
continue;
|
|
||||||
if(growthvectors[pi].Length2() == 0.)
|
if(growthvectors[pi].Length2() == 0.)
|
||||||
continue;
|
continue;
|
||||||
auto next = sel.PNums()[(i+1)%sel.GetNV()];
|
auto next = sel.PNums()[(i+1)%sel.GetNV()];
|
||||||
|
Loading…
Reference in New Issue
Block a user