too fast with segment mapping

This commit is contained in:
Joachim Schoeberl 2021-10-15 22:10:57 +02:00
parent 95301e11ba
commit c20480c662

View File

@ -1435,9 +1435,9 @@ namespace netgen
if (seg.GetNP() == 2) if (seg.GetNP() == 2)
{ {
if (x) if (x)
*x = Point<3,T>((1-xi) * Vec<3>(mesh[seg.PNums()[0]]) + xi * Vec<3>(mesh[seg.PNums()[1]])); *x = Point<3,T>(xi * Vec<3>(mesh[seg.PNums()[0]]) + (1-xi) * Vec<3>(mesh[seg.PNums()[1]]));
if (dxdxi) if (dxdxi)
*dxdxi = Vec<3>(mesh[seg.PNums()[1]])-Vec<3>(mesh[seg.PNums()[0]]); *dxdxi = Vec<3>(mesh[seg.PNums()[0]])-Vec<3>(mesh[seg.PNums()[1]]);
} }
else else
{ {
@ -1448,8 +1448,10 @@ namespace netgen
+ 2*xi*(xi-0.5) * Vec<3>(mesh[seg.PNums()[0]])); + 2*xi*(xi-0.5) * Vec<3>(mesh[seg.PNums()[0]]));
} }
if (dxdxi) if (dxdxi)
*dxdxi = T(1.0) * (Vec<3>(mesh[seg.PNums()[1]])-Vec<3>(mesh[seg.PNums()[0]])) *dxdxi = (4*xi-1)*Vec<3>(mesh[seg.PNums()[0]])
+ (4*xi-3)*Vec<3>(mesh[seg.PNums()[1]])
+ (4-8*xi)*Vec<3>(mesh[seg.PNums()[2]]); + (4-8*xi)*Vec<3>(mesh[seg.PNums()[2]]);
} }
return; return;
} }