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] Node adding more documentation #13102

Merged
merged 14 commits into from
Mar 6, 2025

Conversation

loumalouomega
Copy link
Member

@loumalouomega loumalouomega commented Feb 7, 2025

📝 Description

This PR refactors the Node class. 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. Node as final

  3. Documentation:

    • New docstrings were added for various methods.

🆕 Changelog

  • Removed unused includes and redundant code in node.h.
  • 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.

@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?

@loumalouomega
Copy link
Member Author

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?

Two things:

  • Just moving serializer it is helpful for debugging pourposes, otherwise debugging serializer with node can be painful.
  • Clean up is good (specially unused includes that expotentially increase compilation times as node is included everywhere)

@sunethwarna
Copy link
Member

@KratosMultiphysics/technical-committee agrees with the documentation, but we think node should not be splitted. Thanks a lot for the effort @loumalouomega .

@loumalouomega
Copy link
Member Author

@KratosMultiphysics/technical-committee agrees with the documentation, but we think node should not be splitted. Thanks a lot for the effort @loumalouomega .

can you explain me why?, because it does not harm

@loumalouomega loumalouomega changed the title [Core] Separate header/source of Node. Also adding more documentation [Core] Node adding more documentation Feb 26, 2025
@loumalouomega
Copy link
Member Author

@KratosMultiphysics/technical-committee agrees with the documentation, but we think node should not be splitted. Thanks a lot for the effort @loumalouomega .

Done

roigcarlo
roigcarlo previously approved these changes Feb 26, 2025
@RiccardoRossi
Copy link
Member

@KratosMultiphysics/technical-committee agrees with the documentation, but we think node should not be splitted. Thanks a lot for the effort @loumalouomega .

can you explain me why?, because it does not harm

All of the template stuff becomes problematic if you have a cpp. Also inlining is not any longer automatic...moreover we lose the history

@loumalouomega
Copy link
Member Author

@KratosMultiphysics/technical-committee agrees with the documentation, but we think node should not be splitted. Thanks a lot for the effort @loumalouomega .

can you explain me why?, because it does not harm

All of the template stuff becomes problematic if you have a cpp. Also inlining is not any longer automatic...moreover we lose the history

I have not moved any templated stuff. Neither any inlines function. The history were relatively few functions.

@RiccardoRossi
Copy link
Member

Is it only the save and load you need?

@loumalouomega
Copy link
Member Author

Is it only the save and load you need?

Not only, bues these are not inline methods

@loumalouomega
Copy link
Member Author

I don't understand why @KratosMultiphysics/geomechanics is failing...

@avdg81
Copy link
Contributor

avdg81 commented Feb 26, 2025

I don't understand why @KratosMultiphysics/geomechanics is failing...

We have discovered this failure about half an hour ago ourselves. We have a prepared a small PR that disables the broken test. Hopefully it will be merged within a few hours. On behalf of @KratosMultiphysics/geomechanics, sorry for the inconvenience.

@loumalouomega
Copy link
Member Author

I don't understand why @KratosMultiphysics/geomechanics is failing...

We have discovered this failure about half an hour ago ourselves. We have a prepared a small PR that disables the broken test. Hopefully it will be merged within a few hours. On behalf of @KratosMultiphysics/geomechanics, sorry for the inconvenience.

Is this fixed?, I guess so

@loumalouomega
Copy link
Member Author

@roigcarlo This is just doc now

@loumalouomega loumalouomega added Documentation and removed Refactor When code is moved or rewrote keeping the same behavior labels Mar 5, 2025
@avdg81
Copy link
Contributor

avdg81 commented Mar 5, 2025

I don't understand why @KratosMultiphysics/geomechanics is failing...

We have discovered this failure about half an hour ago ourselves. We have a prepared a small PR that disables the broken test. Hopefully it will be merged within a few hours. On behalf of @KratosMultiphysics/geomechanics, sorry for the inconvenience.

Is this fixed?, I guess so

Yes, it was fixed the night we discovered it.

@loumalouomega loumalouomega merged commit d7fd238 into master Mar 6, 2025
11 checks passed
@loumalouomega loumalouomega deleted the core/separate-node-header-source branch March 6, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

6 participants