Difference between revisions of "Rewrite McLachlan"

From Einstein Toolkit Documentation
Jump to: navigation, search
(Parameter Name Changes)
(Parameter Name Changes)
Line 20: Line 20:
 
{|
 
{|
 
|+
 
|+
! old parameter !! new parameter
+
! old parameter name !! new parameter name
 
|-
 
|-
 
| my_initial_data || initial_data
 
| my_initial_data || initial_data
Line 41: Line 41:
 
|}
 
|}
  
 +
Note:
 
* dt_lapse_shift_method enabled a performance optimization that deliberately led to incorrect values for ADMBase's dtlapse and dtshift.
 
* dt_lapse_shift_method enabled a performance optimization that deliberately led to incorrect values for ADMBase's dtlapse and dtshift.

Revision as of 15:06, 2 January 2015

Overview

The source code of McLachlan -- i.e. the Kranc script that generates the McLachlan thorn family, as well as the associated helper code -- has become somewhat messy over the years. We have begun to clean things up in the "rewrite" branch. These cleanups include:

  • Avoid duplication of equations. Instead of having one calculation per routine there are now a few "master calculations" that define many equations. The actual calculations (routines) are then automatically generated from respective master calculations by choosing which variables should be defined.
  • Rename some parameters. Some parameters have names that are difficult to understand, and that were taken from the original "BSSN_MoL" code. For example, the real parameter "LapseAdvectionCoeff" is now an integer parameter "advectLapse". Also, all parameters now follow the same naming scheme -- starts with underscore, then camelCase. (It is difficult to use underscores in Kranc.)
  • Rename the grid function "phi" to "phiW", since its content depends on what formulation is used.
  • Code generation is now more flexible. Many choices (e.g. BSSN formulation, whether to evolve A, finite differencing order) can now be made either at Kranc time or at run time. This allows generating both generic thorns or highly tuned thorns from the same source code.
  • Setting shiftGammaCoeff=0.0 to disable evolving B^i is now deprecated, and a warning is generated. Instead, set evolveB=0.
  • Some gauge conditions have been corrected for previously unused parameter combinations. In particular, it is now possible to use lapse and shift advection when A is evolved, e.g. when evolving Kerr-Schild data.
  • Some little-used features were removed, e.g. the ability to set up Minkowski initial conditions without using ADMBase.
  • Kranc is now called in parallel by the makefile, which significantly speeds up code generation.

User-Visible Changes

Apart from improvements and new features, these changes break backward compatibility in two ways:

  • Parameter names change. For backward compatibility, it is still possible to use the old parameter names. At run time, the old parameters are interpreted and the new parameters are set correspondingly (if possible), and a warning is produced.
  • The grid function "phi" and its group "ML_log_confac" are renamed to "phiW" and "ML_confac". It is not possible to add a backward compatibility layer for this.

Parameter Name Changes

(For backward compatibility, the old parameter names are still accepted.)

old parameter name new parameter name
my_initial_data initial_data
my_initial_boundary_condition initial_boundary_condition
my_rhs_boundary_condition rhs_boundary_condition
my_boundary_condition boundary_condition
dt_lapse_shift_method (unsupported)
ML_log_confac_bound ML_confac_bound
apply_dissipation (set epsDiss=0 instead)
LapseAdvectionCoeff advectLapse
ShiftAdvectionCoeff advectShift

Note:

  • dt_lapse_shift_method enabled a performance optimization that deliberately led to incorrect values for ADMBase's dtlapse and dtshift.