IAS-Astrophysics / athenak

Performance-portable version of the Athena++ astrophysical AMR-MHD code using Kokkos.
BSD 3-Clause "New" or "Revised" License
34 stars 24 forks source link

Added the ability to output just the hydro or mhd variables (without scalars... #273

Closed jmstone closed 3 months ago

jmstone commented 3 months ago

In GitLab by @mhguo on Sep 15, 2022, 17:18

Added the ability to output just the hydro or mhd variables (without scalars and other variables) in one file

  1. hydro conserved variables are named as hydro_u_h
  2. hydro primitive variables are named as hydro_w_h
  3. mhd conserved variables are named as mhd_u_m
  4. mhd primitive variables are named as mhd_w_m
jmstone commented 3 months ago

In GitLab by @mhguo on Sep 15, 2022, 17:18

requested review from @pdmullen

jmstone commented 3 months ago

In GitLab by @pdmullen on Sep 27, 2022, 08:44

This MR looks good to me. In discussions with Jim, we thought it might be nice if a future MR could enable cherrypicking of output variables as was done in Athena++: https://github.com/PrincetonUniversity/athena/pull/413.

If we adopted such an approach, we could remove something like mhd_w_bcc, for example, and replace it with comma-separated variables:

<output1>
file_type  = bin            # Binary data dump
variable   = mhd_w,mhd_bcc  # variables to be output
dt         = 1.0            # time increment between outputs

In your example, only scalars could be outputted by

<output2>
file_type  = bin            # Binary data dump
variable   = mhd_s          # variables to be output
dt         = 1.0            # time increment between outputs

and MHD primitives + scalars could be outputted by

<output3>
file_type  = bin            # Binary data dump
variable   = mhd_w,mhd_s    # variables to be output
dt         = 1.0            # time increment between outputs
jmstone commented 3 months ago

In GitLab by @pdmullen on Sep 27, 2022, 08:44

approved this merge request

jmstone commented 3 months ago

In GitLab by @jmstone216 on Oct 4, 2022, 11:23

Like Patrick, I feel like the best solution for the future would allow cherry picking of variables through a comma-separated list in the input file. This would allow, e.g., mhd_w, mhd_s, and mhd_bcc or any combination of these. This would be better than trying to hardwire all combinations by hand. However, in the interest of getting this feature added now, I am ok with approving this MR. Perhaps we can ask Tomohiro to implement the more general approach in the near future.

jmstone commented 3 months ago

In GitLab by @mhguo on Oct 4, 2022, 11:48

marked this merge request as ready