Skip to content

Make template interface the default#189

Merged
EmilyBourne merged 5 commits intomainfrom
ebourne_gmg_interface_restructure
Mar 10, 2026
Merged

Make template interface the default#189
EmilyBourne merged 5 commits intomainfrom
ebourne_gmg_interface_restructure

Conversation

@EmilyBourne
Copy link
Collaborator

@EmilyBourne EmilyBourne commented Mar 9, 2026

In order to remove inheritance the GMGPolar class is templated on a certain number of parameters. This is fine for simulations (e.g. gyselalibxx) that want to use the library, but it causes issues for the command line interface. Up to now we used a pointer to a superclass to avoid this problem. However in order to template the Level on the geometry, the function solve will need to be in the subclass. It is not possible to write an abstract interface for a templated function so this solution will no longer be possible. This PR uses std::visit to create an instance of the GMGPolar class. This slows down the compilation as an instance of the class must be created for each configuration that the ConfigParser describes.

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.

@EmilyBourne EmilyBourne marked this pull request as ready for review March 9, 2026 16:47
@EmilyBourne EmilyBourne requested a review from julianlitz March 9, 2026 17:30
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.91%. Comparing base (18d7d76) to head (9df2877).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #189   +/-   ##
=======================================
  Coverage   94.91%   94.91%           
=======================================
  Files          94       94           
  Lines        9516     9516           
=======================================
  Hits         9032     9032           
  Misses        484      484           

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

@EmilyBourne EmilyBourne merged commit b3b9c52 into main Mar 10, 2026
8 checks passed
@EmilyBourne EmilyBourne deleted the ebourne_gmg_interface_restructure branch March 10, 2026 10:22
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