ignore non-evolved points in check_GRHydro_C2P_failed

Issue #1078 closed
Roland Haas created an issue

The attached patch interfaces GRHydro with Carpet/CarpetEvolutionMask to not abort a run if a con2prim failure happens at points that are not active in the sense that they should not be eg. visualized.

CarpetEvolutionMask computes these points by taking the restricted region and modifying it to take buffer zones and ghost zones for prolongation into account.

The proposed patch uses Cray pointers (see https://trac.einsteintoolkit.org/ticket/1065) since the Cactus flesh routine to CCTK_VarDataPtr (for Fortran) uses them as well. This requires extra switches for compilers to compile. For gcc the switch is "-fcray-pointer" for intel adding "-safe_cray_ptr" might help efficiency.

Keyword: GRHydro

Comments (9)

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

    To use the patch, you will have to add

    ActiveThorns = CarpetEvolutionMask CarpetEvolutionMask::verbose = yes CarpetEvolutionMask::writeNaNs = yes CarpetEvolutionMask::enforce_mask = yes CarpetEvolutionMask::enforce_vars = " GRHydro::dens GRHydro::scon GRHydro::tau " GRHydro::use_evolution_mask = yes

    to your parameter file.

  2. Frank Löffler
    • removed comment

    Wouldn't the current code fail without nice error if use_evolution_mask=="true" but CarpetEvolutionMask is not active?

    I am not suggesting this right now, yet, but what would/could change if this would be made default?

    If this could be made default, it has to do nothing if a) Carpet isn't used and b) CarpetEvolutionMask isn't available. The parameter could then be named use_evolution_mask_if_available and wouldn't need to be mentioned in most parameter files.

  3. Roland Haas reporter
    • removed comment

    I updated the patch to include an error check for a NULL return from GetVarDataPtr to the glue routine. In theory the run results should not differ at all with the patch. If they do, it is a bug in CarpetEvolutionMask. This is the major reason why I would not make it the default right now (and why my suggested parameter snipped contains all the enfore_XXX settings): I would very much like to verify that everything works as expected in a full mesh-refined production runs using a moving grid.

    I am not sure if I like a default that silently does something different depending on whether CarpetEvolutionMask is available or not (since I then get no warning if I forget EvolutionMask in my parameter files). I'd be happier with a default that aborts (in ParamCheck, please) if CarpetEvolutionMask is missing and tells me what to do to make it work (a la Carpet's InitBase handling).

    Generally I believe that the less magic is in a code the better.

  4. Frank Löffler
    • removed comment

    I would also be ok with (in the long term) the mask being on by default but running it enabled but without CarpetEvolutionMask would abort (if Carpet is used). Of course it should never abort with PUGH.

    Could a non-active CarpetEvolutionMask but use_evolution_mask=="true" be caught in ParamCheck, recommending either CarpetEvolutionMask (if Carpet is active) or setting use_evolution_mask=="false" (if Carpet is not active -> PUGH)?

  5. Roland Haas reporter
    • removed comment

    This patch is part of this week's GRHydro updates. It will be committed on Sunday.

  6. Log in to comment