-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Octree ray tracing #2442
[WIP] Octree ray tracing #2442
Conversation
Wow cool! Note for reviewers that this depends on the octree ghost zones PR and that should be merged first. Have any eye candy from a RAMSES output? |
A bit more eye candy (in the extent of my artistic capacities): this is a volume rendering of a RAMSES cosmological simulation (64²). Red green and blue indicate the 10⁻²⁹, 10⁻²⁸ and 10⁻²⁷ g/cm³ contours (normalized so that the maximum intensity is 100% in each channel). One main caveat is that the low-order of the integration makes the result look very boxy when going towards higher resolutions. Here's the same image, now with 512² pixels (and a slightly different integration). The origin of the boxy look is probably the fact that the interpolation is only performed along the line of sight and does not make use of the neighbouring cell's values. This could in principle be solved using e.g. a trilinear interpolation with the vertices values obtained from ghost zones (see #2425). |
57948dc
to
89ec558
Compare
This is not crashing and there are very few glitches.
The cython code runs in about 4.34 µs ± 164 ns (for a single lookup). The python code runs in about 187 µs ± 8.98 µs (for a single lookup), i.e. 4x slower.
This is because an oct that's not in the domain may contain cells from multiple other domains, so we have to go down the tree until finding the first leaf oct (or is it cell? Now I'm confused...) in another domain.
Closing this one in favour of #2610 . |
Implements a ray tracer for octree.
See the tests for how to use it.
The datasets are RAMSES datasets, with a single CPU and an AMR structure with
levelmin=1
, i.e. the octree is complete from the root node.TODO