- changed status to resolved
- removed comment
CCTK_ActiveTimeLevels returns "wrong" number
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 (1)
-
- Log in to comment
Instead of the sum, CCTK_ActiveTimeLevels now returns the minimum of the number of active time levels over all refinement levels.