Add 2D Cartesian/RZ EB Neumann support to MLNodeLaplacian#5504
Open
ShuLiu-Clock wants to merge 1 commit into
Open
Add 2D Cartesian/RZ EB Neumann support to MLNodeLaplacian#5504ShuLiu-Clock wants to merge 1 commit into
ShuLiu-Clock wants to merge 1 commit into
Conversation
This adds a 2D-only MLNodeLaplacian API for embedded-boundary inhomogeneous Neumann flux data, documents the EB normal convention, enables RZ RAP stencils, and adds CPU regression tests covering Cartesian, RZ, EB Neumann, EB inflow, and physical Neumann boundary combinations. 3D EB Neumann support remains unsupported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds a 2D-only
MLNodeLaplacianAPI for embedded-boundary inhomogeneous Neumann flux data, documents the EB normal convention, enables RZ RAP stencils, and adds CPU/GPU regression tests covering Cartesian, RZ, EB Neumann, EB inflow, and physical Neumann boundary combinations. 3D EB Neumann support remains unsupported.Summary
This PR adds support for inhomogeneous Neumann data on embedded boundaries for 2D nodal
MLNodeLaplaciansolves.The new API is:
The first component of
eb_neumann_fluxcontains cell-centered cut-cell values ofsigma * dphi/dn_EBat the EB surface.The EB normal convention is documented as the AMReX convention: n_EB points from the valid/fluid region toward the covered/body region.
This PR also enables RAP coarsening for 2D RZ MLNodeLaplacian stencils, including EB stencil and sync-residual paths. The existing EB inflow velocity convention is preserved.
The implementation is limited to 2D. Calls to the new EB Neumann API in other dimensions abort.
Additional background
This is intended for 2D nodal Poisson-type solves with EB natural flux data. The new EB Neumann path is separate from
setEBInflowVelocity: EB inflow remains a velocity-divergence contribution, while the new API supplies the operator boundary fluxsigma * dphi/dn_EB.RZ support includes RAP coarsening so the multigrid hierarchy can remain deep for EB geometries.
A new small regression test directory is added:
It covers Cartesian and RZ baselines, EB Neumann plane/sphere cases, EB inflow compatibility, mixed and all-Neumann physical boundary conditions, and all-Neumann solvability-offset handling.
CPU validation performed:
GPU validation performed:
A focused mpiexec -n 4 GPU smoke test was also run on a single shared GPU with reduced AMReX arena preallocation. All focused CPU/MPI and GPU tests passed.
Checklist
The proposed changes: