trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
541 stars 110 forks source link

Subdirectories for same equation, different spatial dimension #1839

Open DanielDoehring opened 9 months ago

DanielDoehring commented 9 months ago

The equations directory keeps filling up, what do you think about adding directories for e.g. compressible_euler_equations which contains the implementations of the respective dimensions?

SimonCan commented 9 months ago

Sounds like a good idea. Should we have derived equations, like compressible_euler_multicomponent_1d.jl, separate or in the same directory with the equations they derive from? I would slightly tend to the latter.

sloede commented 9 months ago

The equations directory keeps filling up

Haha, you should meet some other scientific codes (200+ files is not uncommon) 😬

But on a more serious note: Personally I think the current number of files is still acceptable (<40). IMHO, I would not add subdirectories lightly here, and there's a reason for it:

Right now, we do not consistently document all the features that Trixi.jl has (or does not have). More specifically, which system of equations for which dimensionality is available is only derived from "the corresponding file exists". Thus, the one directory approach has the advantage that it is easy for both novice and experienced users to figure out what is available.

To summarize, I think keeping the files in one folder is preferable, at least for the time being. Once we get closer to, say, 50 files, I would definitely be open to reconsider this decision. However, I am not dead-set on not adding subdirectories, thus if there is strong support from the community for more subdirectories, I wouldn't stand in the way.