-
Notifications
You must be signed in to change notification settings - Fork 250
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][Element/Condition] using const #4938
Conversation
To be reactivated when the other functions are being deleted
@KratosMultiphysics/technical-committee This is ready to be reviewed Note that the new functions are in most places NOT being called, since the scheme still passes on a non-const ProcessInfo and hence directly the old functions will be called |
@maceligueta it seems like there already is a function
how is this currently used? |
Ping @maceligueta @KratosMultiphysics/dem |
ping @maceligueta @KratosMultiphysics/dem |
Hi @philbucher , sorry about the delay. Many years ago we decided to create an |
@maceligueta thanks, this is what I suspected |
No concerns. I think it should work if you just add the override. |
It seems to work now |
@@ -131,7 +131,7 @@ void TransformNeighbourCoorsToClosestInPeriodicDomain(const ProcessInfo& r_proce | |||
virtual bool CalculateRelativePositionsOrSkipContact(ParticleDataBuffer & data_buffer); | |||
|
|||
using DiscreteElement::Initialize; //To avoid Clang Warning. We tell the compiler that we are aware of the existence of this function, but we overload it still. |
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.
@maceligueta I guess this can be removed afterwards
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.
sure! Should I?
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 think it is better to do it in a future PR, this one is already large and contains delicate changes
@KratosMultiphysics/technical-committee now that we have sorted out some larger things, I would like to take a look at this again, since I think this is quite a necessary cleanup. |
@KratosMultiphysics/technical-committee: 👍 |
Just for the record: This will be followed by another PR changing the scheme to use the added methods with const ProcessInfo and then all developers should adapt their own elements and conditions. |
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.
👍
merging such that I can proceed with the porting |
please wait with implementing this in your code, there will be a followup-PR, with which this PR will become fully available |
this is a new, BACKWARD COMPATIBLE attempt to #2993, for now only a draft and not all the changes to discuss if this is the way to go
=> adv: Backwardcompatible, disadv: the compilation is full of deprecation warnings. Updating the code in the derived classes is easy but at least for some days we would have many warnings
Tests seem to still be working, so I guess this solution would be ok
One way to go would be to add the deprecation-warnings only after some time.
This would give the developers time to adapt