Skip to content

Confusion of the function getAll<Cell> #447

@Alphadius

Description

@Alphadius

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.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions