Skip to content

Remove SourceTerm superclass#209

Merged
EmilyBourne merged 13 commits intomainfrom
ebourne_remove_SourceTerm
Apr 7, 2026
Merged

Remove SourceTerm superclass#209
EmilyBourne merged 13 commits intomainfrom
ebourne_remove_SourceTerm

Conversation

@EmilyBourne
Copy link
Copy Markdown
Collaborator

Remove the SourceTerm superclass. There are many types of SourceTerm. Managing this via a std::variant in the ConfigParser causes the linker to overuse resources (this lead to freezes on my local laptop). To avoid this problem a solve method is added to the ConfigParser which calls GMGPolar.solve with local instances of the necessary boundary conditions and source term. Closes #131


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 Apr 7, 2026

Codecov Report

❌ Patch coverage is 5.00000% with 285 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.69%. Comparing base (6787376) to head (8a36f8b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ConfigParser/select_test_case.cpp 5.00% 285 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
- Coverage   95.32%   90.69%   -4.64%     
==========================================
  Files          86       86              
  Lines        9372     9433      +61     
==========================================
- Hits         8934     8555     -379     
- Misses        438      878     +440     

☔ 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
Copy link
Copy Markdown
Collaborator

My laptop froze as well if compiled with multiple threads because it ran out of the 8GB memory. @EmilyBourne Would be nice if that can be improved.

@julianlitz
Copy link
Copy Markdown
Collaborator

julianlitz commented Apr 7, 2026

Over the last few weeks I probably had like 20 freezes with VS Code taking up to 10 minutes to finally crash 😂

@EmilyBourne
Copy link
Copy Markdown
Collaborator Author

My laptop froze as well if compiled with multiple threads because it ran out of the 8GB memory. @EmilyBourne Would be nice if that can be improved.

😆 This is always a danger with templating. I don't think we instantiate any more instances of the classes than you did before though so I'm not sure why this is so bad for you. Maybe try compiling with less parallelism?

@EmilyBourne EmilyBourne merged commit 23e1382 into main Apr 7, 2026
6 of 8 checks passed
@EmilyBourne EmilyBourne deleted the ebourne_remove_SourceTerm branch April 7, 2026 13:42
@julianlitz
Copy link
Copy Markdown
Collaborator

julianlitz commented Apr 7, 2026

With 2 VS instances running, only one threaded compilation works and with a single VS Code instance I can use 2 threads (before your new PR. Maybe now its better)

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.

Prefer concepts over inheritance

3 participants