Add extensible boundary condition system#121
Open
fluidnumerics-joe wants to merge 2 commits intomainfrom
Open
Conversation
Replace the hardcoded if/else boundary condition dispatch in DGModel classes with a registration-based BoundaryConditionList system. Boundary conditions are now registered via procedure pointers during model initialization and dispatched by walking a linked list. Each BC stores pre-filtered element/side arrays, eliminating branch divergence in GPU kernels. CPU: BC methods are registered in AdditionalInit and called via the list. GPU: Per-BC-type HIP kernels accept element/side device arrays directly, replacing monolithic kernels that scanned all sideInfo entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ECAdvection types inherit from ECDGModel_t → DGModel_t, bypassing the GPU DGModel Init that uploads BC element/side arrays to device. Add Init/Free overrides to GPU ECAdvection2D/3D that call the parent _t Init then hipMalloc/hipMemcpy the BC arrays. Fixes GPU error 700 (illegal address) in ec_advection_2d/3d tests. Co-Authored-By: Claude Opus 4.6 (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
BoundaryConditionListlinked list systemAdditionalInitand dispatched by walking the list — new BC types no longer require modifying DGModel source filesBoundaryConditionnode stores pre-filteredelements(:)/sides(:)arrays populated from meshsideInfoat init timehbc*/pbc*type-bound procedures from theModelbase classTest plan
🤖 Generated with Claude Code