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 bug in indexing for EB-inflow hyperbolics #895

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

baperry2
Copy link
Contributor

  • Move definition of indices used in MOL hyp flux calculations to be defined as macros in IndexDefines.H. otherwise these must be redefined 3 times, including in a user-specified function, which likely to introduce bugs
  • In pc_compute_hyp_mol_flux, instead of defining spr and spl as new arrays that must be allocated and copied into, just point to the appropriate places in qtempl and qtempr. This cuts down on code and should be a bit more efficient.
  • In pc_compute_hyp_mol_flux_eb do the same thing. Note that there is currently a bug where the qtemp arrays aren't sized to store ADV/AUX/LIN quantities, but the indexing used assumes does account for these quantities. This fortunately seems to not have caused issues, but is now fixed.
  • Note that in the function ProblemSpecificFunctions::problem_eb_state we pass both qtemp{l,r} and sp{l,r} as arguments. This is redundant, but shouldn't hurt anything as long as users understand this.

@mjrahimi - can you verify that this updated version of the code works for the oxy-combustor case?

@baperry2 baperry2 requested a review from marchdf January 10, 2025 21:24
@marchdf
Copy link
Contributor

marchdf commented Jan 10, 2025

Good work!

@mjrahimi
Copy link

The solver cannot be compiled. I get this error:
prob.H(532): error: expected an identifier const int 0 = 0; ^

@baperry2 baperry2 enabled auto-merge (squash) January 21, 2025 21:46
@baperry2 baperry2 merged commit 99caa9e into AMReX-Combustion:development Jan 22, 2025
13 checks passed
@baperry2 baperry2 deleted the qtemp-fix branch January 22, 2025 00:38
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.

3 participants