AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
299 stars 97 forks source link

Separate the tracing of the passive and thermodynamic variables #573

Closed maxpkatz closed 5 years ago

maxpkatz commented 5 years ago

We have to carry around NQ variables in the construction of the final interface states, for Ip/Im (and similarly, NQSRC variables for Ip_src/Im_src). By splitting the thermodynamic and passive variables into separate arrays, there's two potential optimizations. First, we only require one wave (the middle wave) for the passive variables, so the second-to-last dimension can be size 1, not size 3. Second, we could configure the PPM reconstruction and tracing to be done one passive variable at a time, so that the passive Ip/Im could be size 1 in the last dimension, not size npassive. This optimization is necessary for being able to scale the PPM algorithm for large networks.

zingale commented 5 years ago

The strategy here is to break q into 3 groups:

Eventually, we will rename q_core -> q

zingale commented 5 years ago

For the 4th order, we would need a q_bar version of each.

zingale commented 5 years ago

important: as part of this, we need to take the velocities out of qpass_map

zingale commented 5 years ago

there is a better way to save memory without the complexity of separating the primitive state. This is to do the parabolic reconstruction and intergration "on demand" as done now on the actual_ppm branch.