Skip to content

Substitute BatchedTridiagonalSolver in SmootherTake#171

Open
julianlitz wants to merge 12 commits intomainfrom
litz_solver_smoother
Open

Substitute BatchedTridiagonalSolver in SmootherTake#171
julianlitz wants to merge 12 commits intomainfrom
litz_solver_smoother

Conversation

@julianlitz
Copy link
Collaborator

@julianlitz julianlitz commented Feb 4, 2026

Summary

This PR refactors SmootherTake to use the new BatchedTridiagonalSolver class, replacing the previous vector-based approach with individual SymmetricTridiagonalSolver instances.
Beyond this core substitution, the PR includes significant improvements to code organization, documentation, and structure.


Key Changes

1. Batched Solver Integration

2. Code Reorganization

  • applyAscOrtho.cpp: Contains orthogonal stencil application
  • solveAscSystem.cpp: Contains line-wise linear system solvers

3. Enhanced Documentation

Added comprehensive header documentation explaining:

  • The coupled circle-radial smoothing algorithm

  • Mathematical formulation:
    A_sc * u_sc = f_sc − A_sc^ortho * u_sc^ortho

  • Update sequence: Black-Circle → White-Circle → Black-Radial → White-Radial

  • Matrix structure and sparsity patterns

  • Boundary condition handling

4. Stencil and Indexing Cleanup

  • Eliminate unused code sections

Testing Notes

Performance validation required before merge

After adding export OMP_NUM_THREADS=$maxOpenMPThreads to run.sh, the new BatchedTridiagonalSolver does yield satisfactory performance. Using omp_set_num_threads(maxOpenMPThreads()) is not sufficient to set the correct thread count for Kokkos.

All functional tests should pass without modification.

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

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 96.55172% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.54%. Comparing base (7748cf5) to head (b98605c).

Files with missing lines Patch % Lines
src/Smoother/SmootherTake/matrixStencil.cpp 75.00% 3 Missing ⚠️
src/Smoother/SmootherTake/solveAscSystem.cpp 96.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   94.15%   94.54%   +0.39%     
==========================================
  Files          92       93       +1     
  Lines        9524     9528       +4     
==========================================
+ Hits         8967     9008      +41     
+ Misses        557      520      -37     

☔ 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.

@julianlitz julianlitz removed the request for review from EmilyBourne February 11, 2026 14:21
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.

1 participant