Unexpected Size in getAll<Cell>() Result List
The function getAll<Cell>() returns a list whose size depends on the cell type.
For example, an edge typically has two nodes, so edge.getAll<Node>() returns a list with two elements.
However, it's important to note that the elements in this list can be null.
So even though an edge has exactly two endpoints by definition, querying associated elements of another type (e.g., edge.getAll<Face>()) may return a list with more entries than the actual number of connected faces, due to null placeholders.
This led to confusion in my case:
For a single block, I queried each face for its number of regions and got 2, when I was expecting 1.
Unexpected Size in
getAll<Cell>()Result ListThe function
getAll<Cell>()returns a list whose size depends on the cell type.For example, an edge typically has two nodes, so
edge.getAll<Node>()returns a list with two elements.However, it's important to note that the elements in this list can be
null.So even though an edge has exactly two endpoints by definition, querying associated elements of another type (e.g.,
edge.getAll<Face>()) may return a list with more entries than the actual number of connected faces, due tonullplaceholders.This led to confusion in my case:
For a single block, I queried each face for its number of regions and got
2, when I was expecting1.