assert cell correct data format
@@ -41,6 +41,11 @@ class Mesh:
self.gmsh_periodic = gmsh_periodic
self.info = info
+ for key, data in cell_data.items():
+ assert len(data) == len(cells), (
+ "Incompatible cell data. {} cell blocks, but '{}' has {} blocks."
+ ).format(len(cells), key, len(data))
+
def __repr__(self):
lines = [
"<meshio mesh object>",
