Skip to content

Fix derive for state variables with ghost cells#707

Merged
baperry2 merged 4 commits intoAMReX-Combustion:developmentfrom
baperry2:state-derive
Oct 23, 2023
Merged

Fix derive for state variables with ghost cells#707
baperry2 merged 4 commits intoAMReX-Combustion:developmentfrom
baperry2:state-derive

Conversation

@baperry2
Copy link
Copy Markdown
Contributor

When deriving a state variable with ghost cells, the derive function in AmrLevel does a FillPatch for the individual state variable. However, in PeleC, the PCHypFillExtDir function can only operate on the full state, not individual variables. Therefore, instead of using the AmrLevel derive function in this case, we should manually FillPatch the whole state and then take the component that we need.

Resolves #706 (the only time this problem comes up right now is when using the adjacent_difference_greater refinement criterion with a state variable, which requires a ghost cell). Also cleans up the derive for LES variables, adds error checking to PCHypFillExtDir to ensure it is only called for the full state, and adds adjacent_difference_greater to a test case.

@baperry2 baperry2 requested a review from marchdf October 20, 2023 20:24
@baperry2 baperry2 enabled auto-merge (squash) October 20, 2023 23:39
@baperry2 baperry2 merged commit f458ddc into AMReX-Combustion:development Oct 23, 2023
@baperry2 baperry2 deleted the state-derive branch October 23, 2023 22:43
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.

AMR refinement based on adjacent_difference_greater is broken

2 participants