Merged
Conversation
… functions with pointer arguments, and fixed a memory leak.
…to use smart pointers in DMD classes.
ckendrick
reviewed
Jan 14, 2025
Collaborator
ckendrick
left a comment
There was a problem hiding this comment.
This is a good set of changes to help modernize the code. I had a few very minor comments, but otherwise this looks good to me.
ckendrick
approved these changes
Jan 15, 2025
dreamer2368
approved these changes
Jan 31, 2025
Collaborator
dreamer2368
left a comment
There was a problem hiding this comment.
Thank you for such an extensive work and all the miscellaneous code cleanup. I left some comments here and there. But they are more of questions out of curiosity, me wondering about the rationale behind your choice of smart/raw pointers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has breaking changes to the API, requiring updates to any application using libROM.
The goal is to replace raw pointers by smart pointers in the library. This has also been done in some examples, but not all, for the purpose of testing the library for memory leaks. The following examples have been run with
valgrindsuccessfully:mixed_nonlinear_diffusionparametric_tw_csvparametric_heat_conductionde_dg_advection_greedypoisson_local_rom_greedyThe use of smart pointers has fixed memory issues in the library and the examples. It has also simplified many things and reduced the number of lines of code significantly, making libROM not only safer but also more readable.