axom
axom copied to clipboard
Make it easy for users to disable a shape in a Klee input file
When we apply replacement rules in Klee-based shaping, we can add a list of materials that the current shape replaces
or does_not_replace
.
It can be convenient to allow users to "disable" a shape by indicating that it does not replace anything. E.g. this can help with debugging.
One way to do this might be to supply an empty list of materials that the current shape replaces. E.g.
shapes:
- name: some_shape
material: some_material
replaces: [] # suggestion: an empty list implies that this shape does not replace anything
This might be error prone (e.g. if a user intends to add materials the replaces list but forgets), so I'm open to other suggestions.
Note: The code currently ignores an empty list. See:
- https://github.com/LLNL/axom/blob/80889b6ca2248ad8abcaedca19f87593a4498320/src/axom/klee/Shape.cpp#L56-L67
To clarify: I'm suggesting a semantic difference between not supplying a replaces
list (in which case, the default is that it replaces everything that's currently shaped in), and supplying an empty replaces
list (which would imply that it replaces nothing).