[Users] syntax for pointers from array in Cactus?

Bernard Kelly physicsbeany at gmail.com
Mon May 23 22:45:07 CDT 2016

Hi. I'm having a compilation issue involving a Cactus array.

I'm trying to simplify my declarations & storage by
declaring/assigning storage for an array called "dataslice" in my
thorn's interface.ccl (numtheta & numphi are thorn parameters):

CCTK_REAL data_slices TYPE=ARRAY DISTRIB=CONSTANT DIM=3 SIZE=59,numtheta,numphi

In my C source file, I get the pointers from the 0th rank of this
array, for passing into an interpolator:

CCTK_POINTER outputs[59];
  outputs[m] = &dataslice[m][0][0];


But during compilation, I get the error

>error: expression must have pointer-to-object type
>outputs[m] = &dataslice[m][0][0];

Note that I *don't* get this error if I instead declare dataslice in
the C file, as

CCTK_REAL dataslice[59][numtheta][numphi];

So it appears that the Cactus ARRAY is not quite the same type as the
C array I was using before. Can anyone enlighten me as to how I should
be handling the array?



More information about the Users mailing list