memilio icon indicating copy to clipboard operation
memilio copied to clipboard

932 Get_default of Parameter HighViralLoadProtectionFactor doesn't work as expected

Open khoanguyen-dev opened this issue 7 months ago • 10 comments

Changes and Information

Please briefly list the changes (main added features, changed items, or corrected bugs) made: Revised Definition of HighViralLoadProtectionFactor:

  • Add a default constructor that initializes the function member to the result of get_default(). This ensures that the function is always properly initialized.
  • An operator() is defined to allow instances of HighViralLoadProtectionFactor to be called like a function. This operator forwards the call to the function member.
  • The function member is initialized in the constructor, ensuring that it always holds a valid callable.

If need be, add additional information and what the reviewer should look out for in particular:

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • [X] Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
  • [X] New code adheres to coding guidelines
  • [X] No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • [X] Tests are added for new functionality and a local test run was successful (with and without OpenMP)
  • [X] Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
  • [X] Proper attention to licenses, especially no new third-party software with conflicting license has been added
  • [X] (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Benchmark Time CPU Iterations

abm_benchmark/abm_benchmark_50k 2721 ms 2716 ms 1 abm_benchmark/abm_benchmark_100k 5682 ms 5674 ms 1 abm_benchmark/abm_benchmark_200k 11855 ms 11773 ms 1


Benchmark Time CPU Iterations

abm_benchmark/abm_benchmark_50k 3087 ms 2953 ms 1 abm_benchmark/abm_benchmark_100k 5698 ms 5690 ms 1 abm_benchmark/abm_benchmark_200k 11585 ms 11554 ms 1

Checks by code reviewer(s)

  • [x] Corresponding issue(s) is/are linked and addressed
  • [x] Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.)
  • [x] Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease)
  • [x] No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • [ ] On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

Closes #932

khoanguyen-dev avatar Jul 11 '24 09:07 khoanguyen-dev