[ET Trac] [Einstein Toolkit] #1554: Want to define constants in parameter files

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue May 20 11:15:02 CDT 2014


#1554: Want to define constants in parameter files
--------------------------+-------------------------------------------------
  Reporter:  eschnett     |       Owner:  sbrandt            
      Type:  enhancement  |      Status:  closed             
  Priority:  major        |   Milestone:                     
 Component:  Cactus       |     Version:  development version
Resolution:  fixed        |    Keywords:                     
--------------------------+-------------------------------------------------

Comment (by rhaas):

 There seems to be no remaining reason for keeping "$". Since the only
 reserved word that may conflict is ActiveThorns, I think we can afford now
 allowing its use. Regular parameter names all have the form
 "THORN::PARAMETER" and ":" is not allowed in constant names. With the
 current implementation the constants are actually changable, ie this
 {{{
 ActiveThorns = IOUtil

 $const = 42

 Cactus::cctk_final_time = $const

 $const = $const / 2

 Cactus::cctk_initial_time = $const

 IO::parfile_write = "generate"
 IO::out_dir = "$parfile"
 }}}
 works as expected if read as a script (ie the generated parfile contains
 42 and 21 for cctk_final_time and cctk_initial_time). If we add a
 "computed goto" statement we are probably Turing complete in our parfiles
 :-P

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1554#comment:31>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list