Recently I'm using the porepy/extended container, where python 3.14 is installed. The exported geometry doesn't look right.
Locating the reason with @Yuriyzabegaev , we found out that porepy/viz/exporter.py exports TensorGrid to polyhedron8 instead of hexahedron. The current implementation works in the old environment because polyhedron8 export was accidentally getting face vertices back in cyclic order from the sparse matrix; the new environment returns an index order which breaks vtkPolyhedron.
A quick fix to this problem is to change the line
elif n == 6 and isinstance(grid, pp.CartGrid):
to
elif n == 6 and isinstance(grid, pp.TensorGrid):
in porepy/viz/exporter.py, so TensorGrid can be exported as hexahedron rather than relying on sparse internal ordering.
Recently I'm using the porepy/extended container, where python 3.14 is installed. The exported geometry doesn't look right.
Locating the reason with @Yuriyzabegaev , we found out that porepy/viz/exporter.py exports TensorGrid to polyhedron8 instead of hexahedron. The current implementation works in the old environment because polyhedron8 export was accidentally getting face vertices back in cyclic order from the sparse matrix; the new environment returns an index order which breaks vtkPolyhedron.
A quick fix to this problem is to change the line
elif n == 6 and isinstance(grid, pp.CartGrid):
to
elif n == 6 and isinstance(grid, pp.TensorGrid):
in porepy/viz/exporter.py, so TensorGrid can be exported as hexahedron rather than relying on sparse internal ordering.