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

Fix regtests with Real BCs and correct a bug #1693

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

AMLattanzi
Copy link
Collaborator

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 fill rho with std::max(ng_cons,ng_vel+1) ghost cells. So this operation will occur over all the rho ghost cells. The second call to FillIntermediatePatch but uses ng_cons directly. By using ng_cons=ng_cons_tot-1 we have an overhead savings since rhoTheta is not needed in the last ghost cell since it is not used to convert VelocityToMomentum.

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 in FillPatchIntermediate where the fill_from_realbdy call was not aware of the starting component icomp_cons. Since this value was hard-coded to 0 we always filled rho rather than filling rho in the first FillPatchIntermediate call and then rhoTheta in the second. Numerical diffusion now works after this correction. A remake of the benchmarks is expected.

@AMLattanzi AMLattanzi requested a review from asalmgren July 17, 2024 15:47
@asalmgren asalmgren merged commit 11b746b into erf-model:development Jul 18, 2024
18 checks passed
@AMLattanzi AMLattanzi deleted the RealBdyFix branch November 12, 2024 21:20
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