Fix review comments: add MultiGrid module with correctness and hygiene fixes - #105
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix code according to review comments
Fix review comments: add MultiGrid module with correctness and hygiene fixes
Jul 21, 2026
Copilot stopped work on behalf of
jdoelz due to an error
July 22, 2026 10:03
jdoelz
marked this pull request as ready for review
July 22, 2026 10:35
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.
Introduces the
MultiGridmodule (from PR #97) with all review-requested fixes applied before merging.Fixes applied
ProlongationBsplines.hpp#include <tuple>(was relying on transitive includes)nonZerosInfoRow()against out-of-bounds access and unsafe decrement when the refined knot value is at/past the last knotnonZerosInfoRow()call out of the innerjloop — it only depends oni, notjnon_zero_alpha(j)linear indexing with explicitnon_zero_alpha(0, j)MultiGridSolver.hpp#define MULTIGRID_*) with a scoped unnamedenumto avoid macro pollution in including translation units:Prolongation.hppfine_glue.get_glue_matrix()andcoarse_glue.get_glue_matrix()into localconstvariables to avoid repeated by-value returns and redundant sparse transposesBembel/MultiGrid(module header)// BEMBEL_MULTIGRID_MODULE_comment on#endifto match the convention used by all other module headersexamples/LaplaceBeltramiMultiGrid.cppmax_itersparameter (default 1000) tommg()and guarded thedo/whileloop withiter < max_itersto prevent indefinite hangs on non-convergent setupsexamples/CMakeLists.txtLaplaceBeltramiMultiGridtoCIFILESso it is built and run in CI