PySWIFTsim merge requestshttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests2021-01-04T08:37:59Zhttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/12update with recent changes in SWIFT2021-01-04T08:37:59ZLoic Hausammannupdate with recent changes in SWIFThttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/11Update CI2020-03-18T13:38:09ZLoic HausammannUpdate CIhttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/10Update SWIFT calls2020-03-18T13:14:04ZLoic HausammannUpdate SWIFT callsLoic HausammannLoic Hausammannhttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/9New implementation2019-06-04T08:31:31ZLoic HausammannNew implementationAdd the temporary file and start working on the stellar physics.Add the temporary file and start working on the stellar physics.https://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/8Add requirements2019-05-23T09:28:43ZLoic HausammannAdd requirementshttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/7Change clone to fetch2019-05-22T15:26:55ZLoic HausammannChange clone to fetchhttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/6Create CI2019-05-21T11:37:10ZLoic HausammannCreate CIhttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/5Last commit before huge rework2019-05-21T08:29:53ZLoic HausammannLast commit before huge reworkhttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/4Add cooling rate example2018-03-08T14:31:15ZLoic HausammannAdd cooling rate examplehttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/3Grackle32018-02-06T15:15:42ZLoic HausammannGrackle3Update cooling wrapper to match last swift developmentUpdate cooling wrapper to match last swift developmenthttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/2Update cooling with Grackle32018-01-05T16:40:10ZLoic HausammannUpdate cooling with Grackle3New structures for grackle and few fixesNew structures for grackle and few fixeshttps://gitlab.cosma.dur.ac.uk/swift/PySWIFTsim/-/merge_requests/1Init2018-01-03T15:26:46ZLoic HausammannInitInitial version of PySWIFTsim.
@pdraper and @matthieu, if you want to review the code. I would like to suggest starting by tests/test_cooling.py to see how the wrapper works. If you want to run it, you will need to switch on the upda...Initial version of PySWIFTsim.
@pdraper and @matthieu, if you want to review the code. I would like to suggest starting by tests/test_cooling.py to see how the wrapper works. If you want to run it, you will need to switch on the update_cooling_grackle branch in Swift and download this file https://bitbucket.org/grackle/grackle/src/4bfba7ac54e5d878f647f7686e517f47b7e1754e/input/CloudyData_UVB=HM2012.h5?at=default. For the setup, just run `python setup.py install --with-swift PATH_TO_SWIFT`.
You can then look at src/parser_wrapper, src/units_wrapper or src/cooling_wrapper (do not care about how I deal with the input/output, you will need to focus on it to understand it).
At the end, you can look at how I deal with the python/C interface. First you can look at pyswiftsim/structure.py where I define a python class for each struct that I am wrapping (using https://docs.python.org/3/library/struct.html) and then to src/pyswiftsim_tools where I define the C methods to transform a python object to a C object. The big advantage of my method is that you can modify any non pointer field (I would like to allow changing a pointer, but it may be tricky).Loic HausammannLoic Hausammann