Fix regtests with Real BCs and correct a bug #1693
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous PR that corrected issues with numerical diffusion provided some conflicts with cases that use Real BCs. The end of the fast integrator will call
apply_bcs
which will fill the fast conserved vars. It will first fillrho
withstd::max(ng_cons,ng_vel+1)
ghost cells. So this operation will occur over all therho
ghost cells. The second call toFillIntermediatePatch
but usesng_cons
directly. By usingng_cons=ng_cons_tot-1
we have an overhead savings sincerhoTheta
is not needed in the last ghost cell since it is not used to convertVelocityToMomentum
.However, numerical diffusion still did not work with the Real BC case after correcting the
ng_cons
size. The root cause of this was found to be a bug inFillPatchIntermediate
where thefill_from_realbdy
call was not aware of the starting componenticomp_cons
. Since this value was hard-coded to0
we always filledrho
rather than fillingrho
in the firstFillPatchIntermediate
call and thenrhoTheta
in the second. Numerical diffusion now works after this correction. A remake of the benchmarks is expected.