Skip to content

Fix small bugs#184

Merged
chengcli merged 4 commits into
mainfrom
cli/fix_small_bugs
Jul 15, 2026
Merged

Fix small bugs#184
chengcli merged 4 commits into
mainfrom
cli/fix_small_bugs

Conversation

@chengcli

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 15, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a few numerical/output correctness issues in the reconstruction and diagnostic-output paths.

Changes:

  • Fix WENO3 scaling on the CPU path by removing an unintended second normalization by vscale.
  • Correct CP3 (center-3 polynomial) coefficients used by Center3InterpImpl.
  • Restrict “path” diagnostic integration to the interior i-range (il..iu) instead of summing over the full extent (including ghost zones).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/recon/interp_impl.h Removes a redundant vscale division in CPU WENO3 interpolation (fixes double-normalization).
src/recon/cp3.cpp Updates CP3 coefficient tensor used for left/right interpolation.
src/output/load_diag_output_data.cpp Slices to [il, iu] before summing along i when computing path-integrated tracer output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/recon/cp3.cpp
Comment on lines 12 to 16
void Center3InterpImpl::reset() {
cm = register_buffer(
"cm", torch::tensor({-1. / 3., 5. / 6., -1. / 6.}, torch::kFloat64));
"cm", torch::tensor({1. / 3., 5. / 6., -1. / 6.}, torch::kFloat64));
cp = register_buffer("cp", cm.flip({0}));
}
Cheng Li and others added 2 commits July 15, 2026 05:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread tests/test_weno.cpp Outdated
Comment thread tests/test_weno.cpp Outdated
@chengcli chengcli merged commit 89f8d60 into main Jul 15, 2026
1 of 3 checks passed
@chengcli chengcli deleted the cli/fix_small_bugs branch July 15, 2026 14:45
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