Skip to content

Reduce amount of calculation for exact solution #277

Merged
AbdelhadiKara merged 13 commits into
mainfrom
akara_compute_exact_solution_vector
May 21, 2026
Merged

Reduce amount of calculation for exact solution #277
AbdelhadiKara merged 13 commits into
mainfrom
akara_compute_exact_solution_vector

Conversation

@AbdelhadiKara
Copy link
Copy Markdown
Collaborator

@AbdelhadiKara AbdelhadiKara commented May 19, 2026

Compute exact solution vector once, store it on host and pass it into functions instead of passing ExactSolution instance.

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.

@AbdelhadiKara AbdelhadiKara changed the title exact solution on host-error on device Reduce amount of calculation for exact solution May 19, 2026
@AbdelhadiKara AbdelhadiKara marked this pull request as ready for review May 19, 2026 15:09
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.74%. Comparing base (a87782a) to head (26da51e).

Files with missing lines Patch % Lines
include/GMGPolar/solver.h 93.54% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
+ Coverage   95.73%   95.74%   +0.01%     
==========================================
  Files          79       79              
  Lines        8492     8512      +20     
==========================================
+ Hits         8130     8150      +20     
  Misses        362      362              

☔ 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 self-requested a review May 20, 2026 12:02
Comment thread include/GMGPolar/solver.h Outdated
Comment thread include/GMGPolar/solver.h Outdated
Comment thread include/GMGPolar/solver.h Outdated
Comment thread include/GMGPolar/solver.h Outdated
Comment thread include/GMGPolar/solver.h Outdated
@julianlitz
Copy link
Copy Markdown
Collaborator

julianlitz commented May 21, 2026

I would not recommend to use The .multiIndex.
I see the benefit that you then only need a single loop to achieve the same access pattern, but you do need more expensive integer operations to compute your indices.

I think that is the main reason GMGPolar can be so fast because we dont need to spend ages converting global to multiindices and searching for neighboring indices.

@julianlitz
Copy link
Copy Markdown
Collaborator

You could check your solution against #270 if you want

@AbdelhadiKara
Copy link
Copy Markdown
Collaborator Author

@julianlitz @EmilyBourne I tried to take into account all of your comments. Feel free to comment if you still see something needs modification.

Comment thread include/GMGPolar/solver.h Outdated
Comment thread include/GMGPolar/solver.h Outdated
Comment thread include/GMGPolar/solver.h Outdated
@AbdelhadiKara AbdelhadiKara merged commit f9810a6 into main May 21, 2026
8 of 9 checks passed
@AbdelhadiKara AbdelhadiKara deleted the akara_compute_exact_solution_vector branch May 21, 2026 14:35
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.

3 participants