trixi-framework / trixi-framework/Trixi.jl
Use enum for directions
Open
discussion
low-priority
- Dominant language
- Julia
- Stars
- 731
- Forks
- 166
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 25
Description
As stated in the docs,
> The directions are numbered as `1 => -x, 2 => +x, 3 => -y, 4 => +y, 5 => -z, 6 => +z`.
As a Java developer, I would want to use an enum instead. This way, the direction would be clear to a reader without reading the docs first. Also, this would be safer, as it doesn't allow other values than 1 and 2 for one dimension, 1 to 4 for two, ...
I just checked, and it seems like enums in Julia work like enums in Java.
Would this be a good idea here (apart from the fact that a lot of code would need to be refactored) and if not, why?
Contributor guide
Assessment
This issue has not been assessed yet.