Add Perfectly Matched Layer (PML) for LinearEuler2D#127
Open
fluidnumericsJoe wants to merge 1 commit into
Open
Add Perfectly Matched Layer (PML) for LinearEuler2D#127fluidnumericsJoe wants to merge 1 commit into
fluidnumericsJoe wants to merge 1 commit into
Conversation
Implements Hu (2001) unsplit auxiliary-differential-equation PML as a new LinearEuler2D_PML model extending LinearEuler2D. Four auxiliary variables (phi_rho, phi_u, phi_v, phi_P) carry the time integral of the acoustic state and couple back through sigma_x*sigma_y; nvar grows 5 -> 9. Auxiliaries have identically zero flux and evolve only via the PML source term, so interior dynamics are unchanged where sigma = 0. PML elements are identified by a configurable material-name prefix (default "pml") in mesh%elemMaterial, which can be populated either programmatically on a StructuredMesh or via the HOHQMesh ISM-MM reader. SetPMLProfile builds a polynomial sigma ramp from a user-supplied interior bounding box, PML thickness, and peak value. Includes CPU and GPU (HIP/CUDA) backends with PML-aware Riemann/flux/ source kernels and no-normal-flow/radiation BC handlers, a regression test asserting >95% absorption of a planar acoustic pulse, an example program demonstrating programmatic mesh tagging, and reference plus tutorial documentation wired into the mkdocs nav. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
LinearEuler2D_PMLmodel: Hu (2001) unsplit ADE-form PML extending the existing 2D linear-Euler model. Adds 4 auxiliary variables (phi_rho,phi_u,phi_v,phi_P;nvar5 → 9) and per-nodesigma_x,sigma_ydamping fields. Interior dynamics are unchanged wheresigma = 0.pml*) inmesh%elemMaterial, supporting both programmatic tagging on aStructuredMeshand HOHQMesh ISM-MM input.SetPMLProfileAPI builds a polynomial sigma ramp from a user-supplied interior box, PML thickness, peak value, and ramp exponent.Test plan
cmake --build) clean (gfortran, debug)self-dev-gpu/ AMD ROCm HIP) clean — kernels and Fortran wrappers compilectest -R lineareuler2d_pml_absorptionpasses (planar pulse, east-side PML, residual ratio 7.3e-8 ≪ 5% tolerance)WORKSPACEset (failures otherwise are pre-existing mesh-path issues)src/,test/,examples/(zero diffs)examples/linear_euler2d_pml_planewavesnapshots in PySELF/ParaView to confirm clean absorptionNotes
ccontinues to live insolution(:,:,:,5)and is preserved across the parent → PML model — the impedance-matched Riemann solver works unchanged through PML interfaces.phi_*carry zero flux and must be initialised to zero by user IC code; the example and test both demonstrate this.SELF_BC_PRESCRIBEDis not auto-registered for the PML model — users registering their own prescribed handler need to fillextBoundary(:,:,:,6:9)(zero is the natural choice).🤖 Generated with Claude Code