Modify

Opened 2 years ago

Last modified 2 years ago

#1965 new enhancement

use CCTK_BOOLEAN for useSpatialBetaDriver in ML_BSSN

Reported by: Roland Haas Owned by:
Priority: minor Milestone:
Component: EinsteinToolkit thorn Version: development version
Keywords: ML_BSSN Cc:

Description

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.

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by Erik Schnetter

ifthen requires a boolean condition; using CCTK_REAL would be a step backwards.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
Next status will be 'confirmed'.
The owner will be changed from (none) to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.