Add the Fishbone-Moncrief initial data thorn to the ET

Issue #2286 closed
Steven R. Brandt created an issue

The desire to include the Fishbone-Moncrief data thorn (one of the wvuthorns) in the ET has been discussed on a number of previous calls. Months ago, the code was added to the manifest for master. Currently, this thorn is building without issue.

Comments (9)

  1. Roland Haas

    I peeked at the code and it is using drand48() in an omp parallel section. However looking at "man drand48" it says that drand48 is not thread safe "MT-Unsafe race:drand48" so this seems wrong to use in a multi-threaded section.

    drand48() is POSIX 2001 which Cactus technically does not require (it also requires a C99 compiler which we do not specifically point out and POSIX 2001 would seem to be 18 years old by now so should exist everywhere).

    The README file should be closer to Cactus default so that it can be parsed for eg author, maintainer and license information.

    Should not user printf() but instead CCTK_VINFO() so that output can be controlled by Cactus.

    ID thorns are expected to only set ID for metric/gauge/hydro variables if the respective ADMBase / HydroBase variables are set to their registered parameter value (I do not know on top of my head the fraction of ID thorns that actually do so, TOVSolver, which to some degree is the prototypical ID thorn, does do so).

  2. Zach Etienne

    Hi Roland,

    Thanks for your comments! I have just implemented all but your last suggestion. Could you please elucidate a little about what you expect should be done? Pointing to code from TOVSolver would be most useful.

    Thanks again!

  3. Roland Haas

    What you need is something like https://bitbucket.org/einsteintoolkit/einsteininitialdata/src/f2e6accbb09bec42698149cadd069ef470838a0f/TOVSolver/src/tov.c#lines-513 and https://bitbucket.org/einsteintoolkit/einsteininitialdata/src/f2e6accbb09bec42698149cadd069ef470838a0f/TOVSolver/src/tov.c#lines-710 though eg https://bitbucket.org/einsteintoolkit/einsteininitialdata/src/f2e6accbb09bec42698149cadd069ef470838a0f/TOVSolver/src/tov.c#lines-557 is wrong b/c it does not honor the ID flags.

    Something like:

    do_lapse = CCTK_Equals(initial_lapse, "FishboneMoncriefID");
    do_metric = CCTK_Equals(initial_data, "FishboneMoncriefID");
    
    for (...) {
      if(do_lapse) alp[idx] = ...
      if(do_metric) {
        gxx[idx] = ...
      }
    }
    

    and if you want to be extra good, you can add something like:

    if(!(CCTK_Equals(initial_data_setup_method, "init_sime_levels") ||
      CCTK_Equals(initial_data_setup_method, "init_single_level")) {
      CCTK_VPARAMWARN(
        "initial_data_setup_method muse be either 'foo' or 'bar', but got '%s',
        initial_data_setup_method);
    }
    

    to check that the InitiaBase::initial_data_setup_method is set to a setting you support. Admittedly few (none other than Carpet which is the code that actually needs to know) codes do so.

  4. Roland Haas

    The thorn currently contains no documentation.tex file. I assume that the ipyton notebooks do contain much better documentation (ie the physics behind the disks, references to the relevant papers etc) than what one normally hopes to find in documentation.tex, so I am not asking for this to be duplicated.

    However documetation.tex is parsed by Cactus’s build system and is used to generate the online documentation at http://einsteintoolkit.org/documentation.html . Thus it would be good if there was at least a skeleton documetation.texthat points to the correct ipython notebook (text or hyperlink) so that the thorn documentation can be found when looking at the thorn guide online (http://einsteintoolkit.org/documentation/ThornGuide.php).

  5. Log in to comment