Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add history file output #366

Merged
merged 4 commits into from
Sep 8, 2023
Merged

Conversation

BenWibking
Copy link
Collaborator

@BenWibking BenWibking commented Sep 7, 2023

Add a "history file" output, inspired by the same feature in Athena.

This writes a text file named "history.txt" in the simulation working directory with scalar-valued statistics that can be computed by the problem generator in the RadhydroSimulation<problem_t>::ComputeStatistics() function. The user is responsible for performing any needed MPI reductions inside this function before returning the computed statistics.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

src/simulation.hpp Outdated Show resolved Hide resolved
src/simulation.hpp Outdated Show resolved Hide resolved
src/simulation.hpp Outdated Show resolved Hide resolved
@BenWibking
Copy link
Collaborator Author

/azp run

Copy link
Collaborator

@markkrumholz markkrumholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you have left it up the the user to reduce statistics across MPI ranks, i.e., this has to be handled in their implementation of ComputeStatistics. It seems like this might be an invitation to user confusion. I understand the reason for the decision, since it allows maximum flexibility -- the user may want to reduce in different ways, e.g., computing extrema versus means -- but it seems like it would be good if the comment here included an explicit warning that the user is responsible for implementing MPI reduction in their ComputeStatistics implementation.

@BenWibking BenWibking added this pull request to the merge queue Sep 8, 2023
Merged via the queue into development with commit 2704e30 Sep 8, 2023
@BenWibking BenWibking deleted the BenWibking/write-history-file branch September 24, 2023 18:43
github-merge-queue bot pushed a commit that referenced this pull request Jul 1, 2024
This updates the shock-cloud problem to use a new setup that:

- tracks the cloud center-of-mass frame
- refines so that the cooling length $l_{\text{cool}} = c_s
t_{\text{cool}}$ is resolved with at least 10 cells
- adds derived fields for temperature, entropy, pressure, etc. to the
outputs
- uses the (simplified) Navier-Stokes Characteristic Boundary Conditions
for inflow/outflow on the left/right sides of the box
- adds shock-cloud problem to nightly regression testing

**This PR depends on:**
* #352
* #360
* #363
* #364
* #365
* #366
* #367
* #430
* #581
* #596
* #597
* #598
* #599
* #616
* #645
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants