Tmunu inherits from ADMBase and StaticConformal without using them

Issue #2627 open
Gabriele Bozzola created an issue

I am not sure if this is a bug or I am missing some second-order effect. The Tmunu thorn inherits from ADMBase and StaticConformal but from what I can tell it doesn’t use anything from either.

Comments (4)

  1. Roland Haas

    Historic leftover and backwards compatible thing I would say.

    The old Tmunu mechanism (using the FRIEND mechanism) had a routine TmunuBase_SetTmunu that used ADMCoupling's STRESSENERGY_guts.h macros, which may have conceivably used ADMBase variables (at least that is my only guess). Or it may have been superfluous when the thorn was first created in 2009. The old Tmunu code was removed in git hash 5a412c0 "TmunuBase: remove deprecated support for old CalcTmunu mechanism" of einsteinbase.

    Right now removing it may be dicey since inheritance is transitive, that is thorns inheriting from TmunuBase get access to all the grid functions that TmunuBase inherited. There is bound to be a thorn out there that only inherits from TmunuBase but still accesses ADMBase variables (valid code in fact).

    This is probably a good candidate for a deprecated features announcement. While I doubt there are Tmunu using thorns that do not also use ADMBase there is a case to be made for no longer requiring StaticConformal in particular since support for conformaly related metrics is essentially non-existent in current codes.

  2. Roland Haas

    Having said that… I can make the full ET compile with minimal modification (to GRHydro which contained a leftover STORAGE statement for conformal_state) when removing those inherits. It also passes all tests. I will propose them to be declared deprecated in the next release and removed afterwards.

  3. Log in to comment