Skip to content

Add an explicit check for the correct number of material indices in smooth_\varepsilon #27

Description

@gvnwst

If a geometry generator is switched out and the material indices array is not correctly updated, you can either have a silent error (where potentially the wrong material is applied) or a pretty esoteric error like

ERROR: LoadError: BoundsError: attempt to access NTuple{4, Int64} at index [5]

but vaguely inside smooth_\varepsilon somewhere.

Adding an explicit check or assertion that the number of provided material indices matches the number of geometric objects would make debugging both these errors much faster.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions