Kratos icon indicating copy to clipboard operation
Kratos copied to clipboard

[Core] Adding clear to assign processes

Open loumalouomega opened this issue 6 years ago • 23 comments

Fixes #6291

This PR adds a clear method for the non-historical assign processes. It check the interval, if outside of the interval clears (set to zero) the variable. In order to avoid conflict between different processes with different intervals, the MARKER flag is considered

loumalouomega avatar Jan 27 '20 11:01 loumalouomega

But the process doesn't have a clear method. How do you want to call this in a list of processes?

pooyan-dadvand avatar Feb 04 '20 16:02 pooyan-dadvand

But the process doesn't have a clear method. How do you want to call this in a list of processes?

Like #6291 is still in discussion this PR may not be the final solution

loumalouomega avatar Feb 04 '20 17:02 loumalouomega

But the process doesn't have a clear method. How do you want to call this in a list of processes?

Ok, I have not understand the point. the idea was to be clled only in these processes as these are the conflictive ones, but sure. It makes more sense as you say

loumalouomega avatar Feb 04 '20 17:02 loumalouomega

blocking to prevent accidental merges on behalf of the @KratosMultiphysics/technical-committee

Ping?

loumalouomega avatar Jun 11 '20 09:06 loumalouomega

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table.

for this reason @KratosMultiphysics/technical-committee does not agree about this PR

In any case, would you mind if I do an independent PR in order to define a virtual Clear function in the base Process?, many processes define a Clear function and every-time that this process is exposed to python the Clear must be re-declared

loumalouomega avatar Jun 17 '20 08:06 loumalouomega

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

In any case, would you mind if I do an independent PR in order to define a virtual Clear function in the base Process?, many processes define a Clear function and every-time that this process is exposed to python the Clear must be re-declared

@KratosMultiphysics/technical-committee strongly agrees with this. The addition of the Clear should be straightforward.

rubenzorrilla avatar Jul 31 '20 10:07 rubenzorrilla

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

In any case, would you mind if I do an independent PR in order to define a virtual Clear function in the base Process?, many processes define a Clear function and every-time that this process is exposed to python the Clear must be re-declared

@KratosMultiphysics/technical-committee strongly agrees with this. The addition of the Clear should be straightforward.

It is done, I added the Clear in the Base Process and override the existing one. Also added some Clear functions to important assign processes

loumalouomega avatar Aug 01 '20 06:08 loumalouomega

You misunderstood, we meant a separated PR with only adding the Clear in the baseclass and fixing the overrides

philbucher avatar Aug 01 '20 11:08 philbucher

After #7324 this is ready to review

loumalouomega avatar Aug 01 '20 16:08 loumalouomega

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table.

for this reason @KratosMultiphysics/technical-committee does not agree about this PR

see comment above

philbucher avatar Aug 01 '20 17:08 philbucher

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

see comment above

Therefore do I close this, or rename the method?

loumalouomega avatar Aug 01 '20 17:08 loumalouomega

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

see comment above

Therefore do I close this, or rename the method?

#6291 is not solved yet

loumalouomega avatar Aug 01 '20 17:08 loumalouomega

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

see comment above

Solved

loumalouomega avatar Aug 01 '20 17:08 loumalouomega

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

see comment above

Solved

Solved long time ago

loumalouomega avatar Feb 13 '21 09:02 loumalouomega

The @KratosMultiphysics/technical-committee discussed this and agrees to add the method Clear to the baseclass of Process but it does NOT agree with the other implementations of this PR

my personal suggestion: Open a new PR where you add the Clear method to Process and close this one

philbucher avatar Feb 17 '21 11:02 philbucher

The @KratosMultiphysics/technical-committee discussed this and agrees to add the method Clear to the baseclass of Process but it does NOT agree with the other implementations of this PR

my personal suggestion: Open a new PR where you add the Clear method to Process and close this one

What is the problem with the implementation?

loumalouomega avatar Feb 17 '21 11:02 loumalouomega

What is the problem with the implementation?

This:

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table.

for this reason @KratosMultiphysics/technical-committee does not agree about this PR

philbucher avatar Feb 17 '21 11:02 philbucher

As discussed in the comments, the solution of adding a Clear is not generic, and the current behaviour is the expected one. A user can set to zero the loads either by prescribing a new loading on the next interval or eventually by adding a load by table. for this reason @KratosMultiphysics/technical-committee does not agree about this PR

Ok, but this PR was done in order to solve an issue. Of course, it changes behaviour, that's the point of the PR. The problem is that it requires explicitly to the user to clear the load after is applied, when it is supposed to disappear once the interval is finished

loumalouomega avatar Feb 17 '21 11:02 loumalouomega

well the @KratosMultiphysics/technical-committee does NOT agree with this change. What might be expected for Structures is exactly the opposite for fluids! I don't know what to say otherwise :sweat_smile:

philbucher avatar Feb 17 '21 11:02 philbucher

well the @KratosMultiphysics/technical-committee does NOT agree with this change. What might be expected for Structures is exactly the opposite for fluids!

But I don't understand, if you want to set some value until the end you can set an interval [something, "End"]. Can I discuss this with @KratosMultiphysics/technical-committee ?

loumalouomega avatar Feb 17 '21 11:02 loumalouomega

BTW, there is already a clear in the base class...

loumalouomega avatar Feb 17 '21 12:02 loumalouomega

What is the status of this¿? @KratosMultiphysics/technical-committee

loumalouomega avatar Dec 23 '21 09:12 loumalouomega

What is the status of this¿? https://github.com/orgs/KratosMultiphysics/teams/technical-committee

loumalouomega avatar Jul 26 '22 11:07 loumalouomega