ML_BSSN macro usage bypasses personalized read/write macros

Create issue
Issue #2641 new
Samuel Cupp created an issue

The new macros are designed to only give access to the variables listed by read/write declarations, but ML_BSSN bypasses this sanity check with its *_Body internal functions. As an example, in ML_BSSN/src/ML_BSSN_ADMBaseInterior.cc is the scheduled function

extern "C" void ML_BSSN_ADMBaseInterior(CCTK_ARGUMENTS)
{
  #ifdef DECLARE_CCTK_ARGUMENTS_ML_BSSN_ADMBaseInterior
  DECLARE_CCTK_ARGUMENTS_CHECKED(ML_BSSN_ADMBaseInterior);
  #else
  DECLARE_CCTK_ARGUMENTS;
  #endif
  DECLARE_CCTK_PARAMETERS;

which then calls

static void ML_BSSN_ADMBaseInterior_Body(const cGH* restrict const cctkGH, const int dir, const int face, const CCTK_REAL normal[3], const CCTK_REAL tangentA[3], const CCTK_REAL tangentB[3], const int imin[3], const int imax[3], const int n_subblock_gfs, CCTK_REAL* restrict const subblock_gfs[])        
{
  DECLARE_CCTK_ARGUMENTS;
  DECLARE_CCTK_PARAMETERS;

The various *_Body should (ideally) either have their required variables passed explicitly or use the macro of the parent function. While the two macros don’t produce different numerical results, the personalized macros help validate the code’s behavior. It is admittedly a pretty low-priority task, but using the new macro is preferred when possible.

Comments (0)

  1. Log in to comment