Skip to content

Memory Requirements #478

Answered by c-white
hwhitehead asked this question in Q&A
Feb 3, 2023 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

If your block size is Nx * Ny * Nz, then you will have Nc = (Nx + 2 * Ng) * (Ny + 2 * Ng) * (Nz + 2 * Ng) cells, where Ng is the number of ghost cells. Each cell will contain Nv = 5 hydro variables (4 for isothermal) plus Nu (default 0) user-output variables. There will generally be Nr = 4 registers (2 copies of the primitives, and 2 copies of the conserved variables, though this can change with choice of time integrator). Finally, if everything is double precision, there are 8 bytes per value. All other memory allocations (refinement buffers, 1D scratch arrays, etc.) are usually small compared to this, so you can estimate 8 * Nc * (Nr * Nv + Nu) bytes per block with just the basic physics.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@hwhitehead
Comment options

@hwhitehead
Comment options

@hwhitehead
Comment options

@tomidakn
Comment options

@hwhitehead
Comment options

Answer selected by hwhitehead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants