Skip to content

Fix negative Jacobian of Lagrange wedge and add test CellSizeFilter2

Florian Maurin requested to merge florian360/vtk:FixNegativeJacobianWedge into master

vtkHigherOrderWedge and vtkWedge have different numbering conventions.

  //    vtkWedge                vtkHigherOrderWedge
  //  4 +-------+ 5               5 +-------+ 4
  //    |\     /|                   |\     /|
  //    | \   / |                   | \   / |
  //    |  \ /  |                   |  \ /  |
  //    | 3 +   |                   | 3 +   |
  //    |   |   |                   |   |   |
  //  1 +...|...+ 2               2 +...|...+ 1
  //     \  |  ,                     \  |  ,
  //      \ | ,                       \ | ,
  //       \|,                         \|,
  //      0 +                         0 +

So in vtkHigherOrderWedge::Triangulate, when vtkWedge* approx = this->GetApproximateWedge is called and then this vtkWedge is tetrahedralized, the volume is negative. To fix that, this MR, swap two points of the generated tetrahedra.

In addition, this MR add a second test for the cell size filter, that check that the length/area/volume of respectively 1d/2d/3d vtkUnstructuredGrid block of size 1x1x1 is 1. The cell types which are checked are in 1d:

  • VTK_LINE, VTK_QUADRATIC_EDGE, VTK_CUBIC_LINE, VTK_LAGRANGE_CURVE, VTK_BEZIER_CURVE

In 2d:

  • VTK_TRIANGLE, VTK_QUAD, VTK_QUADRATIC_TRIANGLE, VTK_QUADRATIC_QUAD, VTK_LAGRANGE_TRIANGLE, VTK_LAGRANGE_QUADRILATERAL, VTK_BEZIER_TRIANGLE, VTK_BEZIER_QUADRILATERAL

and in 3d:

  • VTK_TETRA, VTK_HEXAHEDRON, VTK_WEDGE, VTK_PYRAMID, VTK_QUADRATIC_TETRA, VTK_QUADRATIC_HEXAHEDRON, VTK_QUADRATIC_WEDGE,VTK_QUADRATIC_PYRAMID, VTK_LAGRANGE_TETRAHEDRON, VTK_LAGRANGE_HEXAHEDRON, VTK_LAGRANGE_WEDGE, VTK_BEZIER_TETRAHEDRON, VTK_BEZIER_HEXAHEDRON, VTK_BEZIER_WEDGE

This finish to fix paraview/paraview#18395 (closed)

Edited by Florian Maurin

Merge request reports