sxs-collaboration / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org
Other
162 stars 191 forks source link

Make sure system-specific code is in system namespaces #3459

Open wthrowe opened 3 years ago

wthrowe commented 3 years ago

The one I just noticed is Initialization::subcell::GrTagsForHydro, which is defined in src/Evolution/Systems/GrMhd/ValenciaDivClean/Subcell/GrTagsForHydro.hpp but isn't in a "GrMhd" or "ValenciaDivClean" namespace. This will cause symbol collisions when someone uses this code as a template for another system or formulation.

I'm not just submitting a PR to fix it because this suggests there may be other such problems, and I don't have time to do a full audit right now.

nilsdeppe commented 3 years ago

I agree. Just to give context, I think that code is system-agnostic but I wasn't sure where to place the action because writing a test for it is sort of difficult if not using an existing system. my hope was we would come up with a good location for some of these shared GR .*hydrodynamics actions and migrate the code there :)