[ET Trac] [Einstein Toolkit] #1965: use CCTK_BOOLEAN for useSpatialBetaDriver in ML_BSSN

Einstein Toolkit trac-noreply at einsteintoolkit.org
Sun Sep 25 10:18:13 CDT 2016


#1965: use CCTK_BOOLEAN for useSpatialBetaDriver in ML_BSSN
-----------------------------------+----------------------------------------
 Reporter:  rhaas                  |       Owner:                     
     Type:  enhancement            |      Status:  new                
 Priority:  minor                  |   Milestone:                     
Component:  EinsteinToolkit thorn  |     Version:  development version
 Keywords:  ML_BSSN                |  
-----------------------------------+----------------------------------------
 This parameter used to be a string keyword accepting "yes" and "no" and
 was changed to a CCTK_INT in the ML rewrite. Making it a CCTK_BOOLEAN
 won't change it's C type (both CCTK_INT and CCTK_BOOLEAN are ints in C++)
 but will let users use the same parfile with both pre and post-rewrite
 code (or alternative the same code with pre and post-rewrite parfiles).

 If we really cared about the speed we *may* consider making it a CCTK_REAL
 so that {{{ifthen(v==1, a,b)}}} could be written as {{{ifthen(v, a,b)}}}
 thus saving on the comparison operation required and on a int->real
 conversion.

 This would require adding support for Boolean Parameters to Kranc's
 Param.m which does not seem difficult.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1965>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list