#1651: Problems with expansions in parameter files ---------------------+------------------------------------------------------ Reporter: hinder | Owner: sbrandt Type: defect | Status: accepted Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by knarf):
For what it is worth, most examples brought up use generic variable names 'A', 'B', ect. - while in practice a reader would most often "correctly guess" from the variable name what is done here: {{{ CarpetRegrid2::radius_1[1] = CoordBase::xmax / 2 CarpetRegrid2::radius_1[1] = CarpetRegrid2::radius_1[2] / 2 }}} strongly suggests that CoordBase::xmax is set somewhere in the file, simply because that is something you would expect a user to always set. I am not arguing that it would not be possible to construct confusing examples - but rather that most cases would "intuitively understood" by the context.
I would suggest to leave the position of an assignment free, but to provide a facility in Cactus that, given a parameter file, does not run past the parameter file parser (especially does not allocate large memory), and simply outputs the parameter file with all expressions replaced. This way a review of a parameter file would be made much simpler - there would be no surprises and replacements can easily be checked even by the person sending the parameter file for review, creating even less work for the reviewer. For convenience it might even provide the "diff" between the original and processed parameter file as well.