Scheduling of GRHydro_SqrtSpatialDeterminant.

Issue #2087 closed
Eloisa Bentivegna created an issue

GRHydro calculates and stores the determinant of the spatial metric, among other places, in CCTK_INITIAL. However, there is currently no provision for this to happen after ADMBase_PostInitial, which can potentially change the spatial metric before the initial data is finalized. It can therefore happen that GRHydro uses old metric data.

The attached patch solves this problem.

Keyword:

Comments (6)

  1. Roland Haas
    • removed comment

    Should we maybe ensure instead that HydroBase_Prim2ConInitial runs after ADMBase_PostInitial and that GRHydro_SqrtSpatialDeterminant runs in between?

  2. Eloisa Bentivegna reporter
    • removed comment

    Well, GRHydro_SqrtSpatialDeterminant is already scheduled to run before HydroBase_Prim2ConInitial, so if the former runs after ADMBase_PostInitial, the latter will too. Are there practical cases where the two suggestions differ? (Or are you just proposing a logically better solution?)

    Note: my first patch had the new constraint in the BEFORE block, not in AFTER. I just replaced it.

  3. Roland Haas
    • removed comment

    The logic is flawed :-). Just because both GRHydro_SqrtSpatialDeterminant and ADMBase_PostInitial are scheduled to run before HydroBase_Prim2ConInitial, no ordering is yet imposed between GRHydro_SqrtSpatialDeterminant and ADMBase_PostInitial. Your updated patch does impose a correct ordering though.

    I think my original comment was based on not knowing on top of my head whether HydroBase_Prim2ConInitial was scheduled to run after ADMBase_PostInitial or not.

    Your patch looks fine to me. Please apply (do you have commit rights?).

  4. Log in to comment