Calculate Volume of Quadratic Tetrahedron

I have an unstructured mesh of quadratic tetrahedrons. I would like to calculate the volume of
each cell, but I am only able to calculate the volume of a linear tetrahedron using vtk.vtkMeshQuality.TetVolume(cell). Is there any way or possible workaround to calculate the volume of nonlinear cells in vtk? Maybe using shape functions?

Welcome to the VTK Discourse , @alx. vtkCellSize should handle quadratic tetrahedrons. Give that a try.

1 Like

Thank you for the hint! I tested the vtkCellSizeFilter and compared the results with vtkMeshQuality and the volume calculation by some finite element preprocessors.
For my curved quadratic tetrahedron I get the following results:
8.633 (vtkMeshQuality.TetVolume = linear tetrahedron formula)
9.617 (vtkCellSizeFilter)
9.946 (volume calculated by multiple FE preprocessors)
Is there any change to further improve to accuracy?

I’m afraid I don’t see any available option to increase the refinement. I’ve sent a question to one of the authors of the filter to see if he can offer any guidance.

Is it possible that VTK represents quadratic tetrahedra differently from the other preprocessors?