DECLARE_CCTK_ARGUMENTS_FunctionName does not handle on-private grid variables correctly

Create issue
Issue #2359 closed
Roland Haas created an issue

For grid variables declared PRIVATE in interface.ccl the fully qualified variable name is ThornName::VariableName while for PUBLIC or PROTECTED variables the fully qualified variable name is ImplementationName::VariableName and those forms are what needs to be passed to eg CCTK_VarIndex or CCTK_VarDataPtr. seems always use the thorn name, which fails if thorn name and implementation name differ and non-PRIVATE variables are used.

An example is where var1 is of that time since the implementation is TestReadWriteImp. The auto-generated DECLARE_CCTK_ARGUMENTS_TestReadWrite_TestC_A macro contains:

cctki_vi_Var1 = CCTK_VarIndex("testreadwrite::var1");

which uses the thorn name, leading to NULL pointer for var1 even though TestReadWrite_TestC_A declares the variable as WRITES.