CCTK_ActiveTimeLevels returns "wrong" number

Issue #941 closed
Christian Reisswig created an issue

CCTK_ActiveTimeLevels is supposed to return the current number of active timelevels for a given grid function. Currently, however, with multiple reflevels (and also maps), CCTK_ActiveTimeLevels returns "number of active time levels""number of reflevels""number of maps". Unfortunately, e.g. CarpetInterp can get confused when asked to time interpolate. A grid function, which technically only has one level per reflevel active, will have 3 levels active according to CCTK_ActiveTimeLevels when there are 3 reflevels. CarpetInterp may then think that indeed there are enough active time levels to time interpolate even though there are not. This previously led to segfaults in CarpetInterp in certain circumstances (now fixed by avoiding to call CCTK_ActiveTimeLevels).

CCTK_ActiveTimeLevels really calls GroupStorageCrease in Carpet/src/Storage.cc. At line, 207, the total number of timelevels is computed. Instead of making this a product between number of reflevels, timelevels, and maps, would it be possible to instead compute the minimum over reflevels, maps? According to Erik, different reflevels/maps can have different number of active timelevels. If we return the minimum, then we are on the safe side and CCTK_ActiveTimeLevels would return a correct number.

Keyword: CCTK_ActiveTimeLevels

Comments (2)

  1. Erik Schnetter
    • changed status to resolved
    • removed comment

    Instead of the sum, CCTK_ActiveTimeLevels now returns the minimum of the number of active time levels over all refinement levels.

  2. Log in to comment