Closed rbooth200 closed 8 years ago
Thank you Richard for your passionate work about this! I can confirm that the code compiles and the dust tests seem to be running fine. Given the size of the request it's a bit difficult for me to do more than this - although I will try to go through the code as well.
About the userguide, it is largely fine.
I'm sure other things will come to my mind, but this is a long message already so I'll stop now!
PS with hindsight, we should have rebased onto master rather than merging - in this way the list of changes would include only your changes and not also the other ones... but now it's too late. Perhaps we should give it as a policy for future pull requests
I've pushed some changes that should fix the names (I'd forgotten that I was playing around with them). I've also fixed the timing names, which arose because I got rid of a load of functions in GradhSphTree.cpp.
The particles are currently identified within the code via ptype, and are stored in the snapshot in order of type, so the type can be worked out from where they are in the file (which is what splash does). I haven't tested the read to see if it's working in gandalf yet...
I'll work on some of the rest.
Just found a few EndTiming calls that didn't match in GradhSphTree so fixed them. Otherwise, seemed to be working fine for me for the gas-only tests
A few more comments :
Thanks for fixing the end timing calls.
In direct reply to your points:
Similarly, I didn't add a bibliography since there wasn't one, but it would make sense to use one if we go down that road. I added the description of the algorithms since I thought it would be useful, but we don't have to keep. I do think that for non-standard things like dust, radiation transport etc. we should include references (where possible) so that people can follow it up.
I just fixed a bug that crept into the non-periodic tree forces. All tests seem to be working fine for me now
The dust particle read/write in C++ should now be working for both seren formats (needs testing). Column format is not supported at the moment. What should we do about this?
I have modified the python library to handle also dust particle types (which actually required changing a lot of C++ code and only two lines of python code...). I tried using it and it seems fine to me. While doing so I also noticed that the render functions have the "sph" type hard-coded. I guess we actually want to pass that as a parameter as happens in the other plotting functions?
That would be good, with a default to sph?
Also, it might make sense to support multiple types in the render, although if this is more work it could probably be delayed.
What do you mean with multiple types? Rendering the total density (gas+dust)?
Exactly
I've just added a note about sinks & dust in the user guide. It would be good if someone could check this.
The merge appears successful: Travis checks are passed and test problems look fine.
Great - I think we are ready to merge - I've also added the possibility of specifying the type to render. I will also add multiple types as Richard suggests but it takes a bit longer. I think it's actually best to create a separate issue for that
I'm happy with suggestion. There are simple enough work arounds in the mean time, (e.g. the density can be summed).
Okay, I've run a few more (non-dust) tests to make sure the basic hydro + gravity is still working and it seems fine. I also run a couple with mirror boundaries and seems to work so I'm happy to pull this if everyone else is. At some point, we'll have to do some tests with other particle types (e.g. cdm) but for now, this branch is supposed to be for dust so the others can be done later.
Although before we pull, I just noticed the warning that this branch has conflicts (presumably problems merging with master now we've merged other pull requests). I guess we should resolve these first.
I'll try to rebase the conflicts
This build failure is due to asserts in the openmp region. Should this be an issue?
It also appears that MPI is now broken in the dust branch. I don't know when this happened though...
Remove the asserts in the openmp sections. I did the same mistake (which I`m guessing you copied) but then I deleted mine. Not sure about the mpi though. Did you test the dust with mpi before? And also, is this pure mpi or hybrid?
Ok, thanks. I assumed asserts in OpenMP should be fine. I'll fix it though.
I've found the bug in the MPI, it's related to the 2nd dust implementation only and is due to the MPI ghosts. It should be ok to fix tonight.
I've pushed a fix for the MPI and the asserts in the openmp + mpi build. I've run a few dust and pure gas tests of differing nature and all seems to be working fine in serial, openmp and mpi. Let me know if you have any issues...
If you find conflicts when pulling the changes, it is due to the rebase that I did. Seems like this a bad idea on branches that have already been pushed. The best thing to do is to delete your dust branch and pull from the repository again.
So it's time to think about merging the dust back into the master branch. I have been keeping the dust branch up to date with the master, so this should (currently be straightforward).
The changes are pretty extensive, affecting the tree and grad-h sph, as well as some changes to boundary conditions, IO, and even the meshless (which was very minor). I have modified the ICs to add a couple of new test problems and added dust to some of the others as well (but in a not in systematic way). I have also written some documentation. I've pulled changes from some different places, such as the userguide branch, but I don't envisage any direct problems,
The current issues that I'm aware about are:
I haven't done anything regarding sinks, but I'm sure that there will be issues that need fixing. Some help/guidance on this would be much appreciated.