[ET Trac] [Einstein Toolkit] #798: allow calculations in parameter assignments in parameter files

Einstein Toolkit trac-noreply at einsteintoolkit.org
Wed Apr 18 09:04:05 CDT 2012


#798: allow calculations in parameter assignments in parameter files
--------------------------+-------------------------------------------------
  Reporter:  rhaas        |       Owner:        
      Type:  enhancement  |      Status:  review
  Priority:  optional     |   Milestone:        
 Component:  Cactus       |     Version:        
Resolution:               |    Keywords:        
--------------------------+-------------------------------------------------

Comment (by eschnett):

 As much as I dislike the sign convention for %, I think it is important to
 be consistent with C (and Fortran), and to be consistent between / and %.

 Here is an idea:
 - define a function CCTK_INT imod(CCTK_INT, CCTK_INT) that wraps %
 - define a macro isint(T) ((T)0.1==(T)0.0)
 - use isint(x) ? imod(x,y) : fmod(x,y)

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


More information about the Trac mailing list