Skip to content

Conversation

baperry2
Copy link
Contributor

@baperry2 baperry2 commented May 9, 2025

Currently if the requested plane location for the DiagFramePlane Diagnostic is not available, we just silently do nothing. After this PR, we will raise an error, unless the user has specified the dump_ghost_if_OOB option, in which case the first ghost cell in the relevant face will be dumped (all levels get their respective first ghost cell). This is intended as debugging capability, for example giving users direct access to visualize what bcnormal is doing.

In PeleLMeX, the first ghost cell on domain boundaries corresponds to the BC at the boundary face.

In PeleC, the first ghost cell on domain boundaries corresponds to the state 1/2 cell over from boundary face, which gets set such that applying standard operators will lead to the desired values on the face.

@baperry2 baperry2 requested a review from malihass May 9, 2025 20:23
Copy link
Collaborator

@malihass malihass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that, it works great in a turbulent channel flow case!
One change that would be good
Can we dump the error message or the info message only once (not MPI process times)?

Also (not for this PR), but it the LMeX doc, it would be nice to have the dump_ghost_if_OOB option.

@baperry2 baperry2 requested a review from malihass May 15, 2025 16:53
@baperry2
Copy link
Contributor Author

Modified so the warning only gets printed once. Leaving the error as is, because we want to ensure an error is always raised if needed.

Moved Docs here so we don't have to maintain separate Docs for this capability in LMeX and C, and added something for the new flag.

@baperry2 baperry2 enabled auto-merge (squash) May 15, 2025 16:55
Copy link
Collaborator

@malihass malihass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super! Thanks for the change
Yesterday we noticed that the plane at Step 0 was not dumped, so if you want to add this that would be great, otherwise it is already great the way it is!

@baperry2 baperry2 merged commit 951869f into AMReX-Combustion:development May 15, 2025
10 checks passed
@baperry2 baperry2 deleted the diagplane-ghost branch May 15, 2025 18:41
@baperry2
Copy link
Contributor Author

The change to dump the plane at step 0 will need to go in PeleC/LMeX I think

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