use GRHydro_polytrope_handle whenever prim2conpolytrope is called

Create issue
Issue #623 closed
Roland Haas created an issue

Currently GRHydro uses grhydro_eos_handle in both Primitive2Conservative and Primitive2ConservativePoly and relies on grhydro_eos_handle being an actual handle to the 2d polytype in the later. This means that calling Primitive2ConservativePoly from within a run with grhydro_eos_type == "General" uses the wrong handle (namely the general eos). This is not normally a problem since Primitive2ConservativePoly is only ever called if grhydro_eos_type == "polytype", with the exception of EoSChangeGammaK which always calls Primitive2ConservativePoly (and has to call a polytype routine).

There are basically two ways to make this work in this case: use GRHydro_polytrope_handle in Primitive2ConservativePoly call prim2conPoly from within EoSChangeGammaK

The first option has the disadvantage that this is not what Conservative2Primitive does. The second has the disadvantage that EoSChangeGammaK has to also recompute Yecons (and any other new conservatives we might define) on top of calling prim2conPoly.

Any comments?

Keyword:

Comments (2)

  1. Roland Haas reporter
    • changed status to resolved
    • removed comment

    Christian Ott removed the offending code from the EoSChange routines. Since the other occurrences should be "save" since they are bracketed by proper logic (albeit somewhere else in the code) I think this is "fixed".

  2. Log in to comment