Skip to content
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

[Core] Separate header/source of Node. Also adding more documentation #13102

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

loumalouomega
Copy link
Member

@loumalouomega loumalouomega commented Feb 7, 2025

📝 Description

This PR refactors the Node class, primarily by reorganizing the code in the header (node.h) and implementing new functionality in the source file (node.cpp). The changes include:

  1. Refactoring and Clean-Up:

    • Several unused imports and redundant definitions were removed from node.h.
    • The constructor and member functions were adjusted, with some deprecated or redundant code removed.
  2. Move partially implementation to node.cpp

  3. Node as final

  4. Documentation:

    • New docstrings were added for various methods.

🆕 Changelog

  • Removed unused includes and redundant code in node.h.
  • Moved part of the code to source file.
  • Improved function documentation for better clarity and maintainability.
  • Node as final

@loumalouomega loumalouomega added Cleanup Kratos Core Refactor When code is moved or rewrote keeping the same behavior labels Feb 7, 2025
@loumalouomega loumalouomega requested a review from a team as a code owner February 7, 2025 13:51
Copy link
Contributor

@matekelemen matekelemen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave quite a few functions in the header.

kratos/includes/node.h Outdated Show resolved Hide resolved
kratos/includes/node.h Show resolved Hide resolved
kratos/includes/node.h Outdated Show resolved Hide resolved
kratos/includes/node.h Outdated Show resolved Hide resolved
kratos/includes/node.h Show resolved Hide resolved
@sunethwarna
Copy link
Member

Since we are touching the Node here, why don't we make it final also? @KratosMultiphysics/technical-committee

@loumalouomega
Copy link
Member Author

Since we are touching the Node here, why don't we make it final also? @KratosMultiphysics/technical-committee

Something tells me it is going to crash something

@roigcarlo
Copy link
Member

roigcarlo commented Feb 14, 2025

I see no problem in the refactor but I doubt that for this particular class implementing something in the cpp can lead to any improvement. They are very cheap to parse anyway. The problematic ones (the inlined) still need to remain in the header.

That being said, why we want to make the node final exactly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Kratos Core Refactor When code is moved or rewrote keeping the same behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants