AFD-Illinois / kharma

Kokkos-based High-Accuracy Relativistic Magnetohydrodynamics with AMR
BSD 3-Clause "New" or "Revised" License
33 stars 16 forks source link

Fix normalizing B under Face-CT #111

Closed bprather closed 3 months ago

bprather commented 3 months ago

This is the patch for fixing #110, see description there.

I would like to put in a proper test before merging this straight into stable. If someone could verify it works for their case, this will need a review, too.

vedantdhruv96 commented 3 months ago

I can verify this and review the PR. Since this is an initialization issue, I assume running it a couple (or even just one) timestep should suffice to confirm that the fix works?

bprather commented 3 months ago

Yeah exactly. The first dump should either show beta=100 with the script in the issue, or not.

vedantdhruv96 commented 3 months ago

Just tested this fix and it seems to be working. Here's the output from the script,

Gas pressure max:  0.004089842185900548
Mag. pressure max:  4.089861522027286e-05
beta_min:  99.99952721805779

Approving this PR.

bprather commented 3 months ago

Great, let's merge this and I can add the full FM test against pyharm separately. Since pyharm only has the unmagnetized torus right now, it will take some time.