Skip to content
Snippets Groups Projects

GRHD: Refactor c2p

Merged Florian Atteneder requested to merge fa/c2p into main
1 unresolved thread
  • Mainly refactors c2p in order to allow to ignore the total energy density in the recovery procedure. This is possible for cold equations of state, where we don't need to evolve tau.

  • The c2p now also incorporates a conservative fixing that we adapted from from arXiv:1306.4953, Appendix.

  • We had to update reftest data for the SRHD simple wave and GRHD bondi tests. Especially the GRHD bondi tests improved from not using tau in the reconstruction.

  • We also updated the default value atm_treshold_factor so that it is now slightly large than one. This fixes some errors where we misidentified atmosphere states as being below atmosphere, before the c2p procedure started.

  • Because this PR was cherry-picked from the fa/doublecartoon+av branch, we also brought over the changes in the naming of variables of the doublecartoon formulation (which should have went into another PR, but I was too lazy to entangle those changes first).


I noticed that the number of allocs in rhs sections are now quite increased. This is particularly bad for the SRHD tests. My guess is this is due to this refactor now passing on both EoSs as parameters to the c2p routine.

Merge request reports

Merge request pipeline #6588 passed

Merge request pipeline passed for d13a1396

Test coverage 66.97% (0.00%) from 1 job

Merged by Florian AttenederFlorian Atteneder 11 months ago (Apr 22, 2024 12:05pm UTC)

Loading

Pipeline #6589 passed

Pipeline passed for 6f4332b5 on main

Test coverage 66.96% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
215 end
216 end
217
218 # setup bracket
219 mu_a = 0.0
220 # with no EM fields we can find the root of (49) analytically, because r = const.
221 mu_plus = 1.0 / sqrt(h02 + r2)
222 mu_b = r < h0 ? 1.0 / h0 : mu_plus
223 What_a = fn_What(mu_a)
224 What_b = fn_What(mu_b)
225 What_plus = fn_What(mu_plus)
226 if D / What_plus > ρmax
227 error("Invalid state encountered!")
228 end
229
230 if (c2p_freeze_atm > 0.0 && c2p_reset_atm == 0.0 && D < 0.99*ρmin)
  • The factor of 0.99 should have been 1.01 or so, because it wrongly flags atmosphere states. This factor is now removed and the choice of atm_threshold_factor should now account for this fudge.

  • Please register or sign in to reply
  • mentioned in commit 6f4332b5

  • Please register or sign in to reply
    Loading