File tree Expand file tree Collapse file tree
src/io4dolfinx/backends/pyvista Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 74 : "pyramid" ,
4545}
4646
47+ _quadratric_vtk = {
48+ 21 : "interval" ,
49+ 22 : "triangle" ,
50+ 23 : "quadrilateral" ,
51+ 24 : "tetrahedron" ,
52+ 25 : "hexahedron" ,
53+ }
54+
4755
4856read_mode = ReadMode .serial
4957
@@ -161,9 +169,14 @@ def read_mesh_data(
161169 if (cell_type := cell_types [0 ]) in _first_order_vtk .keys ():
162170 cell_type = _first_order_vtk [cell_type ]
163171 order = 1
172+ elif cell_type in _quadratric_vtk .keys ():
173+ cell_type = _quadratric_vtk [cell_type ]
174+ order = 2
164175 elif cell_type in _arbitrary_lagrange_vtk .keys ():
165176 cell_type = _arbitrary_lagrange_vtk [cell_type ]
166177 order = _cell_degree (cell_type , cells .shape [1 ])
178+ else :
179+ raise NotImplementedError (f"Cell type { cell_type } not supported in Pyvista backend." )
167180 perm = dolfinx .cpp .io .perm_vtk (dolfinx .mesh .to_type (cell_type ), cells .shape [1 ])
168181 cells = cells [:, perm ]
169182 lvar = int (basix .LagrangeVariant .equispaced )
You can’t perform that action at this time.
0 commit comments