let Cactus thorns register citation requests at runtime

Issue #2254 open
Roland Haas created an issue

Pull request is here: https://bitbucket.org/cactuscode/cactusutils/pull-requests/20/formaline-let-use-codes-registers/diff

A while ago there was some discussion to have Cactus output the list of requested citations during the run. This pull request is the “simple” solution to this by just introducing a couple of lines of code to let thorns register (arbitrary really) strings for citations.

A more complex method would be to extend configuration.ccl to have fields for this, then edit the piraha parser and the Cactus flesh datastructure sto store that information. Then have flesh functions to query the information and finally have Formaline call those functions.

I sample usage is in the rhaas/citation branch of GRHydro.

Output looks like this:

requested_citation_keys="Baiotti:2004wn"
requested_citations="@Article{Baiotti:2004wn,
  requested-for \=\"EinsteinEvolve/GRHydro\",
  author \=       \"Luca Baiotti and Ian Hawke and Pedro J. Montero and
                  Frank L{\\\"o}ffler and Luciano Rezzolla and Nikolaos
                  Stergioulas and Jose A. Font and Ed Seidel\",
  title \=        \"{Three-dimensional relativistic simulations of
                  rotating neutron star collapse to a Kerr black
                  hole}\",
  journal \=      \"Phys. Rev. D\",
  volume \=       71,
  year \=         2005,
  pages \=        024035,
  eprint \=       \"arXiv:gr-qc/0403029\",
  adsurl \=
                  {http://www.slac.stanford.edu/spires/find/hep/www?rawcmd\=find+doi+10.1103/PhysRevD.71.024035},
  doi \=          \"10.1103/PhysRevD.71.024035\",
  SLACcitation \= \"%%CITATION \= GR-QC/0403029;%%\"
}
"
suggested_citation_keys="Giacomazzo:2007ti,Hawke:2005zw,Moesta:2013dna"
suggested_citations="@Article{Giacomazzo:2007ti,
  suggested-for \=\"EinsteinEvolve/GRHydro\",
  author \=       \"Giacomazzo, Bruno and Rezzolla, Luciano\",
  title \=        \"{WhiskyMHD: a new numerical code for general
                  relativistic magnetohydrodynamics}\",
  journal \=      \"Class. Quantum Grav.\",
  volume \=       24,
  year \=         2007,
  pages \=        \"S235-S258\",
  eprint \=       \"arXiv:gr-qc/0701109\",
  adsurl \=
                  {http://www.slac.stanford.edu/spires/find/hep/www?rawcmd\=find+doi+10.1088/0264-9381/24/12/S16},
  doi \=          \"10.1088/0264-9381/24/12/S16\",
  SLACcitation \= \"%%CITATION \= GR-QC/0701109;%%\"
}
@Article{Hawke:2005zw,
  suggested-for \=\"EinsteinEvolve/GRHydro\",
  author \=       \"Hawke, Ian and L{\\\"o}ffler, Frank and Nerozzi,
                  Andrea\",
  title \=        \"{Excision methods for high resolution shock
                  capturing schemes applied to general relativistic
                  hydrodynamics}\",
  journal \=      \"Phys. Rev. D\",
  volume \=       71,
  year \=         2005,
  pages \=        104006,
  eprint \=       \"arXiv:gr-qc/0501054\",
  adsurl \=
                  {http://www.slac.stanford.edu/spires/find/hep/www?rawcmd\=find+doi+10.1103/PhysRevD.71.104006},
  doi \=          \"10.1103/PhysRevD.71.104006\",
  SLACcitation \= \"%%CITATION \= GR-QC/0501054;%%\"
}
@article{Moesta:2013dna,
      suggested-for \=\"EinsteinEvolve/GRHydro\",
      author         \= \"M{\\\"o}sta, Philipp and Mundim, Bruno C. and Faber, Joshua A.
                        and Haas, Roland and Noble, Scott C. and Bode, Tanja and
                        L{\\\"o}ffler, Frank and Ott, Christian D. and Reisswig, Christian
                        and Schnetter, Erik\",
      title          \= \"{{GRHydro}: {A} new open source general-relativistic
                        magnetohydrodynamics code for the {E}instein {T}oolkit}\",
      year           \= \"2014\",
      journal        \= {Classical and Quantum Gravity},
      volume         \= {31},
      number         \= {1},
      pages          \= {015005},
      doi            \= \"10.1088/0264-9381/31/1/015005\",
      eprint         \= \"arXiv:1304.5544 [gr-qc]\",
}
"

Keyword: Formaline

Comments (2)

  1. Roland Haas reporter

    Pull request is here: https://bitbucket.org/cactuscode/cactusutils/pull-requests/20/formaline-let-use-codes-registers/diff

    A while ago there was some discussion to have Cactus output the list of requested citations during the run. This pull request is the “simple” solution to this by just introducing a couple of lines of code to let thorns register (arbitrary really) strings for citations.

    A more complex method would be to extend configuration.ccl to have fields for this, then edit the piraha parser and the Cactus flesh datastructure sto store that information. Then have flesh functions to query the information and finally have Formaline call those functions.

    I sample usage is in the rhaas/citation branch of GRHydro.

    Output looks like this:

    requested_citation_keys="Baiotti:2004wn"
    requested_citations="@Article{Baiotti:2004wn,
      requested-for \=\"EinsteinEvolve/GRHydro\",
      author \=       \"Luca Baiotti and Ian Hawke and Pedro J. Montero and
                      Frank L{\\\"o}ffler and Luciano Rezzolla and Nikolaos
                      Stergioulas and Jose A. Font and Ed Seidel\",
      title \=        \"{Three-dimensional relativistic simulations of
                      rotating neutron star collapse to a Kerr black
                      hole}\",
      journal \=      \"Phys. Rev. D\",
      volume \=       71,
      year \=         2005,
      pages \=        024035,
      eprint \=       \"arXiv:gr-qc/0403029\",
      adsurl \=
                      {http://www.slac.stanford.edu/spires/find/hep/www?rawcmd\=find+doi+10.1103/PhysRevD.71.024035},
      doi \=          \"10.1103/PhysRevD.71.024035\",
      SLACcitation \= \"%%CITATION \= GR-QC/0403029;%%\"
    }
    "
    suggested_citation_keys="Giacomazzo:2007ti,Hawke:2005zw,Moesta:2013dna"
    suggested_citations="@Article{Giacomazzo:2007ti,
      suggested-for \=\"EinsteinEvolve/GRHydro\",
      author \=       \"Giacomazzo, Bruno and Rezzolla, Luciano\",
      title \=        \"{WhiskyMHD: a new numerical code for general
                      relativistic magnetohydrodynamics}\",
      journal \=      \"Class. Quantum Grav.\",
      volume \=       24,
      year \=         2007,
      pages \=        \"S235-S258\",
      eprint \=       \"arXiv:gr-qc/0701109\",
      adsurl \=
                      {http://www.slac.stanford.edu/spires/find/hep/www?rawcmd\=find+doi+10.1088/0264-9381/24/12/S16},
      doi \=          \"10.1088/0264-9381/24/12/S16\",
      SLACcitation \= \"%%CITATION \= GR-QC/0701109;%%\"
    }
    @Article{Hawke:2005zw,
      suggested-for \=\"EinsteinEvolve/GRHydro\",
      author \=       \"Hawke, Ian and L{\\\"o}ffler, Frank and Nerozzi,
                      Andrea\",
      title \=        \"{Excision methods for high resolution shock
                      capturing schemes applied to general relativistic
                      hydrodynamics}\",
      journal \=      \"Phys. Rev. D\",
      volume \=       71,
      year \=         2005,
      pages \=        104006,
      eprint \=       \"arXiv:gr-qc/0501054\",
      adsurl \=
                      {http://www.slac.stanford.edu/spires/find/hep/www?rawcmd\=find+doi+10.1103/PhysRevD.71.104006},
      doi \=          \"10.1103/PhysRevD.71.104006\",
      SLACcitation \= \"%%CITATION \= GR-QC/0501054;%%\"
    }
    @article{Moesta:2013dna,
          suggested-for \=\"EinsteinEvolve/GRHydro\",
          author         \= \"M{\\\"o}sta, Philipp and Mundim, Bruno C. and Faber, Joshua A.
                            and Haas, Roland and Noble, Scott C. and Bode, Tanja and
                            L{\\\"o}ffler, Frank and Ott, Christian D. and Reisswig, Christian
                            and Schnetter, Erik\",
          title          \= \"{{GRHydro}: {A} new open source general-relativistic
                            magnetohydrodynamics code for the {E}instein {T}oolkit}\",
          year           \= \"2014\",
          journal        \= {Classical and Quantum Gravity},
          volume         \= {31},
          number         \= {1},
          pages          \= {015005},
          doi            \= \"10.1088/0264-9381/31/1/015005\",
          eprint         \= \"arXiv:1304.5544 [gr-qc]\",
    }
    "
    

    Keyword: Formaline

  2. Log in to comment