RePrimAnd Con2Prim#126
Conversation
AsterX: add code for RePrimAnd C2P
MChabanov
left a comment
There was a problem hiding this comment.
Some comments from my side! Code looks very good!
diagnostic, add vwlim condition in Palenzuela C2P
MChabanov
left a comment
There was a problem hiding this comment.
Great effort! I'm very impressed. Most comments are minor and are mainly related to consistency with the old code. Thanks!
| atmo.set(pv, cv, glo); | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
Note that this functionality already exists in line 226 of con2prim.cxx
AsterX/AsterX/src/con2prim.cxx
Line 226 in 19a463e
| cv.DYe); | ||
| set_to_nan(pv, cv); | ||
| return; | ||
| } |
There was a problem hiding this comment.
isfinite(cv.dens) is checked below in line 116. cv.dens <= 0 should be captured before
AsterX/AsterX/src/con2prim.cxx
Line 226 in 19a463e
Hence, I'm not sure if we need this check here?
| if (std::isfinite(a) && std::isfinite(b) && b >= a) { | ||
| const CCTK_REAL width = b - a; | ||
| const CCTK_REAL scale = | ||
| fmax(CCTK_REAL(1.0), fmax(std::abs(a), std::abs(b))); |
There was a problem hiding this comment.
Same comment as before for Palenzuela and Entropy:
To my understanding RPA solves for 1/(hW) which has the limits 0 < mu < 1/hmin ...
That means you will likely choose 1 for the scale ...
I would be good to double-check that, in case that's true the better lower limit would be again 0.0, so, replace line 181 with
fmax(CCTK_REAL(0.0), fmax(std::abs(a), std::abs(b)));
Add RPA support to Con2PrimFactory.
Code tested on Vista: