Conversation
There was a problem hiding this comment.
Pull Request Overview
Fixes scalar indexing in the callback stage by introducing a temporary CPU‐side Jacobian helper and updating the 1D integration API.
- Add
volume_jacobian_tempas a stopgap before a GPU kernel implementation - Swap usage of
volume_jacobianfor 1D callbacks and provide a newintegratewrapper - Refactor comments in
stable.jland introduceget_node_vars_viewfor GPU array slicing
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/solvers/dg.jl | Added volume_jacobian_temp; corrected GPU-dimension comment |
| src/callbacks_step/analysis_dg_1d.jl | Replaced volume_jacobian usage; added integrate for 1D |
| src/auxiliary/stable.jl | Reformatted comments; cleaned helpers; added get_node_vars_view |
Comments suppressed due to low confidence (3)
src/callbacks_step/analysis_dg_1d.jl:74
- The positional arguments to
integrate_via_indicesare misaligned: the first parameter should be the functionfunc, followed byu. Useintegrate_via_indices(func, u, mesh, ...)to match its signature.
integrate_via_indices(u, mesh, equations, dg, cache; normalize = normalize) do u, i, element, equations, dg
src/callbacks_step/analysis_dg_1d.jl:71
- [nitpick] The name
integratemay collide with existing Base or common library functions; consider a more specific name or module namespace to prevent ambiguity.
function integrate(func::Func, u,
src/auxiliary/stable.jl:28
- The new helper
get_node_vars_viewlacks unit tests. Adding coverage will catch slicing errors early.
# Call to get slice of GPU arrays outside of GPU kernels.
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.
Includes fix for #156.