Skip to content

Correct FMG routine to start prolongation at the proper level#124

Merged
julianlitz merged 5 commits intomainfrom
26-fix-fmg-error
Sep 23, 2025
Merged

Correct FMG routine to start prolongation at the proper level#124
julianlitz merged 5 commits intomainfrom
26-fix-fmg-error

Conversation

@julianlitz
Copy link
Copy Markdown
Collaborator

@julianlitz julianlitz commented Sep 22, 2025

The FMG routine previously started the FMG interpolation from the wrong level and accessed uninitialized data.
With this mistake corrected, the number of total iterations is significantly reduced when the number of multigrid levels is small.

Example

Before:
Full-Multigrid: 2x F(1,1)-Cycle
Start depth: 3
Solve depth: 3
Interpolate from: 2 to 1
Apply MGC on : 1
Apply MGC on : 1
Interpolate from: 1 to 0
Apply MGC on : 0
Apply MGC on : 0

After:
Full-Multigrid: 2x F(1,1)-Cycle
Start depth: 3
Solve depth: 3
Interpolate from: 3 to 2
Apply MGC on : 2
Apply MGC on : 2
Interpolate from: 2 to 1
Apply MGC on : 1
Apply MGC on : 1
Interpolate from: 1 to 0
Apply MGC on : 0
Apply MGC on : 0

Merge Request - GuideLine Checklist

Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.

Checks by code author:

Always to be checked:

  • There is at least one issue associated with the pull request.
  • New code adheres with the coding guidelines
  • No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

If functions were changed or functionality was added:

  • Tests for new functionality has been added
  • A local test was succesful

If new functionality was added:

  • There is appropriate documentation of your work. (use doxygen style comments)

If new third party software is used:

  • Did you pay attention to its license? Please remember to add it to the wiki after successful merging.

If new mathematical methods or epidemiological terms are used:

  • Are new methods referenced? Did you provide further documentation?

Checks by code reviewer(s):

  • Is the code clean of development artifacts e.g., unnecessary comments, prints, ...
  • The ticket goals for each associated issue are reached or problems are clearly addressed (i.e., a new issue was introduced).
  • There are appropriate unit tests and they pass.
  • The git history is clean and linearized for the merge request. All reviewers should squash commits and write a simple and meaningful commit message.
  • Coverage report for new code is acceptable.
  • No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.38%. Comparing base (3134b8b) to head (0e7dff9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/GMGPolar/solver.cpp 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   85.31%   85.38%   +0.06%     
==========================================
  Files          76       76              
  Lines        4364     4364              
==========================================
+ Hits         3723     3726       +3     
+ Misses        641      638       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/GMGPolar/solver.cpp Outdated
@julianlitz julianlitz changed the title Fix FMG starting level Correct FMG routine to start prolongation at the proper level Sep 22, 2025
@julianlitz julianlitz removed the request for review from EmilyBourne September 22, 2025 18:41
@julianlitz julianlitz merged commit f05231a into main Sep 23, 2025
5 checks passed
@julianlitz julianlitz deleted the 26-fix-fmg-error branch September 23, 2025 08:54
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