-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate include after ifdefs in core and solver h #1170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like those small clean up.
It's just small questions in my comments on the way we should name things, but I don't think changes would be required in this respect.
@@ -1,3 +1,18 @@ | |||
/* --------------------------------------------------------------------- | |||
* | |||
* Copyright (C) 2019 - by the Lethe authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to update the year?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in another PR when we change the license everywhere
Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice uniformization and it's cool to learn that it can affect compile time.
I left a few comments and some files were not modified, but they do not follow the exact same format as the others. I've listed them here:
- In
include/core/inexact_newton_non_linear_solver.h
, it should belethe_inexact_newton_non_linear_solver_h
instead oflethe_inexact_newton_iteration_non_linear_solver_h
- In
include/core/kinsol_newton_non_linear_solver.h
, it should belethe_kinsol_newton_non_linear_solver_h
instead ofkinsol_non_linear_solver_h
- In
include/core/phase_change.h
, it should belethe_phase_change_h
instead ofphase_change_h
- In
include/solvers/cahn_hilliard.h
, it should belethe_cahn_hilliard_h
instead ofcahn_hilliard_h
@@ -18,7 +18,6 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lines 16-17, it should be lethe_grid_tools_h
instead of lethe_lethegridtools_h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should actually be lethe_lethe_grid_tools_h
This class is weirdly named, will be refactored :)
Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com>
Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com>
Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com>
Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com>
Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com>
Btw, thank you for the super exhaustive PR description :D |
Well rumor has it that someone has made a super cool amazing templates for PR and it makes it super easy now to write good PR messages. I'm just following the new very clear guidelines. |
Description Everywhere throughout the include files of the core and the solver library, there were multiple includes that were defined before the #ifndef -> #define -> #endif statements. This is mostly aesthetics, but this can also have a small impact on compilation time, especially on systems with a slow filesystem (e.g. the clusters). See for example: https://stackoverflow.com/questions/20988705/is-an-include-before-ifdef-define-include-guard-okay Additionally, some of the include guards were in capital letters, some were not. Heck, some were even missing. So I took the opportunity to uniformize thing. I limited myself to core/solver as a first step, but in a follow-up PR I could do it for the other parts of the library. Testing There are not tests required here. If the code compiles, everything will be fine. Documentation No documentation was modified in the making of this PR. Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com> Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com> Former-commit-id: eea049f
Description Quick refactor as done in PR chaos-polymtl#1170 that moves header includes after the #define. Some @brief has been added here and there at the same time. Former-commit-id: 9beea0c
Description Everywhere throughout the include files of the core and the solver library, there were multiple includes that were defined before the #ifndef -> #define -> #endif statements. This is mostly aesthetics, but this can also have a small impact on compilation time, especially on systems with a slow filesystem (e.g. the clusters). See for example: https://stackoverflow.com/questions/20988705/is-an-include-before-ifdef-define-include-guard-okay Additionally, some of the include guards were in capital letters, some were not. Heck, some were even missing. So I took the opportunity to uniformize thing. I limited myself to core/solver as a first step, but in a follow-up PR I could do it for the other parts of the library. Testing There are not tests required here. If the code compiles, everything will be fine. Documentation No documentation was modified in the making of this PR. Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com> Co-authored-by: Amishga Alphonius <107414376+AmishgaAlphonius@users.noreply.github.com> Former-commit-id: eea049f
Description
Everywhere throughout the include files of the core and the solver library, there were multiple includes that were defined before the #ifndef -> #define -> #endif statements. This is mostly aesthetics, but this can also have a small impact on compilation time, especially on systems with a slow filesystem (e.g. the clusters). See for example: https://stackoverflow.com/questions/20988705/is-an-include-before-ifdef-define-include-guard-okay
Additionally, some of the include guards were in capital letters, some were not. Heck, some were even missing. So I took the opportunity to uniformize thing. I limited myself to core/solver as a first step, but in a follow-up PR I could do it for the other parts of the library.
Testing
There are not tests required here. If the code compiles, everything will be fine.
Documentation
No documentation was modified in the making of this PR.
Checklist (will be removed when merged)
See this page for more information about the pull request process.
Code related list:
Pull request related list: