Enforce that arrangement names can only contain letters, numbers, or underscores

Issue #1082 closed
Erik Schnetter created an issue

Keyword:

Comments (4)

  1. Frank Löffler
    • removed comment

    Why should we do this? What about, for example, dashes, tildes, spaces, dots? What about umlauts? How should we enforce the non-use of some characters?

    I can understand that a project like the Einstein Toolkit should avoid certain characters like backslashes or colons, which is a strategical decision. I disagree that Cactus itself should limit that choice technically. On the contrary, it should work with whatever it finds.

  2. Erik Schnetter reporter
    • removed comment

    This restriction is described in the users' guide.

    Enforcing means that we check all arrangement names in the thorn list, and abort with an error if an illegal character is found.

    Technically, C identifiers are created from arrangement names, after converting them to upper case. Having e.g. dashes in there leads to very strange error messages, if at all. See CST, routine CreateThornsHeaders, and the auto-generated file cctk_DefineThorn.h.

  3. Erik Schnetter reporter
    • changed status to resolved
    • removed comment

    Since restricting arrangement names to be legal C identifiers is currently required by Cactus, I have added a respective check where the thorn name is check as well (file CST, routine CreateThornList).

  4. Log in to comment