MCPcopy Create free account
hub / github.com/Kitware/VTK / SetUniformOrderFromNumPoints

Method SetUniformOrderFromNumPoints

Common/DataModel/vtkHigherOrderWedge.cxx:1270–1288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1268}
1269
1270void vtkHigherOrderWedge::SetUniformOrderFromNumPoints(vtkIdType numPts)
1271{
1272 const double n = static_cast<double>(numPts);
1273 static const double third(1. / 3.);
1274 static const double ninth(1. / 9.);
1275 static const double twentyseventh(1. / 27.);
1276 const double term =
1277 std::cbrt(third * sqrt(third) * sqrt((27.0 * n - 2.0) * n) + n - twentyseventh);
1278 int deg = static_cast<int>(round(term + ninth / term - 4 * third));
1279
1280#ifdef VTK_21_POINT_WEDGE
1281 if (numPts == 21)
1282 {
1283 deg = 2;
1284 }
1285#endif
1286
1287 this->SetOrder(deg, deg, deg, numPts);
1288}
1289
1290void vtkHigherOrderWedge::SetOrder(int s, int t, int u, vtkIdType numPts)
1291{

Callers 10

GetOrderMethod · 0.95
CreateWedgeFunction · 0.45
GetLagrangePCoordsMethod · 0.45
MakeLagrangeHexahedronFunction · 0.45
MakeLagrangeWedgeFunction · 0.45
MakeBezierQuadrilateralFunction · 0.45
MakeBezierHexahedronFunction · 0.45
MakeBezierWedgeFunction · 0.45

Calls 3

SetOrderMethod · 0.95
sqrtFunction · 0.50
roundFunction · 0.50

Tested by 7

CreateWedgeFunction · 0.36
MakeLagrangeHexahedronFunction · 0.36
MakeLagrangeWedgeFunction · 0.36
MakeBezierQuadrilateralFunction · 0.36
MakeBezierHexahedronFunction · 0.36
MakeBezierWedgeFunction · 0.36