Skip to content

Commit

Permalink
Correct cell ordering between Fortran/C code
Browse files Browse the repository at this point in the history
  • Loading branch information
cphyc committed May 29, 2020
1 parent 93a5036 commit be79cb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yt/utilities/lib/pyoctree_raytracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def set_fields(self, fields, log_fields, no_ghost, force=False):
vertex_data = np.log10(vertex_data)

# Vertex_data has shape (2, 2, 2, ...)
self.data = vertex_data.reshape(8, -1)
# Note: here we have the wrong ordering within the oct (classical Fortran/C
# ordering issue) so we need to swap axis 0 and 2.
self.data = vertex_data.swapaxes(0, 2).reshape(8, -1)

def cast_rays(self, vp_pos, vp_dir):
"""Cast the rays through the oct.
Expand Down

0 comments on commit be79cb0

Please sign in to comment.