- edited description
DECLARE_CCTK_ARGUMENTS_FunctionName does not handle on-private grid variables correctly
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
.
rdwr.pl
seems always use the thorn name, which fails if thorn name and implementation name differ and non-PRIVATE variables are used.
An example is https://bitbucket.org/cactuscode/cactustest/src/master/TestReadWrite/interface.ccl 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
.
Comments (3)
-
reporter -
reporter - changed title to DECLARE_CCTK_ARGUMENTS_FunctionName does not handle on-private grid variables correctly
-
- changed status to closed
- Log in to comment