gandalfcode / gandalf

GANDALF (Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids)
GNU General Public License v2.0
44 stars 12 forks source link

Iorig #81

Closed giovanni-rosotti closed 7 years ago

giovanni-rosotti commented 7 years ago

Added the ability in python to access iorig. A bit of hacking as it is technically stored as a float in C++, but I actually the copy the memory from the original integer. So if interpreted as a float it just contains garbage; python on the other side reinterprets it correctly.

dhubber commented 7 years ago

Oh, why is it held as a float and not as an integer? I'm confused :-S

giovanni-rosotti commented 7 years ago

Because I am too lazy to have C++ support arbitrary types when iorig is the only non-float quantity we will ever use. It would be a lot of work, especially to make it interoperable with Python, and I think it's not worth it