Out of memory error in `viz` of 3D `RectilinearGrid` from Meshes.jl

raman_kumar
Fri, 02 May 2025 21:46:04 +0000
Visualization

I want to plot a grid using Meshes.jl and GLMakie.jl. I am reading the HDF5 data file output of Athena++ astrophysical code using HDF5.jl library. In Athena++ mesh grid is divided into smaller parts called Blocks to use block level parallelization. In code below i create x ,y ad z direction coordinates points for 872 blocks using rand in matrices. I got out of memory error. How can i plot the grid containing x, y and z coordinate points for every block?

using HDF5, Meshes, GLMakie
x = rand(Float32, 18,872)
y = rand(Float32, 4,872)
z = rand(Float32, 16,872)

grid = RectilinearGrid(vec(x), vec(y), vec(z))
viz(grid, alpha = 0.3)

34 posts - 5 participants