[field] Fix incorrect assertion in StaggeredGrid constructor
@@ -285,6 +285,7 @@ class StaggeredGrid(Grid):
values = reduce_sample(values, elements)
elif callable(values):
values = values(elements.center)
+ if elements.shape.shape.rank > 1: # Different number of X and Y faces
assert isinstance(values, TensorStack), f"values function must return a staggered Tensor but returned {type(values)}"
assert 'staggered_direction' in values.shape
if 'vector' in values.shape:
