[Users] Odd CCTK_VarDataPtrI behaviour?

Roland Haas rhaas at aei.mpg.de
Mon Oct 26 11:18:01 CDT 2015

Hello Frederico,

> CCTK_VarIndex (example_gf[0]) --> 180
> CCTK_VarIndex (example_gf[1]) --> 181
> However when the index is fed to CCTK_VarDataPtrI to get a pointer to the
> grid function, it always points to the 0th component. To get the pointer to
> the component I wanted, I had to increment the pointer by the correct
> amount.
> This not a major inconvenience, but it is quite counterintuitive. Is there
> a reason for such behaviour?
Sounds like a bug to me, namely I wonder what would happen if you were
to pass "example_gf[1]" to say CarpetIOHDF5::out_vars.

Can you check what the results of CCTK_VarDataPtrI(cctkGH, 0,
CCTK_VarIndex("example_gf[1]")) and CCTK_VarDataPtr(cctkGH, 0,
"example_gf[1]") is and if they agree? At the very least I would have
expected that they agree.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4881 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20151026/02547fd0/attachment.bin 

More information about the Users mailing list