-
Notifications
You must be signed in to change notification settings - Fork 249
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] Add saving distance in skin in CalculateNodalDistanceToSkinProcess
#12133
[Core] Add saving distance in skin in CalculateNodalDistanceToSkinProcess
#12133
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.
Considering that we have a parameters-based constructor, which is the advantage of using local flags rather than a simple bool? In this regard, I note that local flags have always been a pain in the *ss.
|
I think this is a legacy reason. Honestly, I don't think it is the best of the ideas to make everything derive from
Well, I don't think performance of having two
If so, I think we should reconsider this again @KratosMultiphysics/technical-committee .
You are not planning to do so but by adding them you open the possibility for others to do it. Hence, I'm of the opinion of simply precluding it. |
TLDR: I removed the local flags |
I tend to agree with @rubenzorrilla that making the constructor incompatible with |
Just to add that local flags are suitable as nodal or elemental data (where the memory and access time are crucial) but in processes it is more a legacy from the time we didn't have parameters. |
OK, but there are used in different places |
I am using |
Regarding to usage of local_flags in the processes, @KratosMultiphysics/technical-committee would encourage the use of Parameters in the argument list and not using Flags nor bools if possible. Internally, we see using member variables is more clear and straightforward. |
The model part constructor is only accesible via C++, not python, do you want I removed it?, this was added less thana a week ago. |
I have nveer used local flags in this PR as input argument, I was using them to store the information (Process derives from Flags) |
CalculateNodalDistanceToSkinProcess
CalculateNodalDistanceToSkinProcess
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.
Are you using the non standard constructor? If not, I would remove it
docs/pages/Kratos/Processes/Calculation/calculate_nodal_distance_to_skin_process.md
Show resolved
Hide resolved
…istanceToSkinProcess
Suggestions applied @pooyan-dadvand |
This is ready @pooyan-dadvand |
Ping @pooyan-dadvand |
👋 |
ANyone? |
Ping @pooyan-dadvand |
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.
Thanks @loumalouomega
📝 Description
This PR introduces several enhancements and adjustments in
CalculateNodalDistanceToSkinProcess
(the process for calculating nodal distances to the skin). Key updates include:Distance value storage in skin model: Implemented functionality to store distance values directly in the skin model part. By default is deactivated, if activated will save the maximum distance in the found skin geometry and set the flag
VISITED
. This also deactivate shared memory parallelization.Lambda function updates: Updated lambda functions now support the improved mechanism for saving distance values in the skin model part, facilitating a more streamlined and efficient process.
Default parameters: Added and refined default parameters for the process to enhance user experience by providing clearer guidelines and reducing the need for manual adjustments.
Improved printed information: Adjustments to the information printout provide a better representation of process settings and variables, aiding in debugging and process optimization.
Documentation updates: The
calculate_nodal_distance_to_skin_process.md
documentation has been extensively updated to include detailed explanations of the process enhancements. It covers the support for calculating distances to skin entities, introduces new lambda functions, and discusses the addition of flags for data type selection and decision-making regarding the storage of distances in the skin model part. The documentation also clarifies the functionalities of default parameters.New test method: Introduced a new test method,
test_ComputeDistanceToSkinWithSavedDistanceInSkin
, to thetest_calculate_nodal_distance_to_skin_process.py
file. This test verifies that specific conditions in the skin model part are correctly addressed during the process, ensuring the reliability of the new features.🆕 Changelog
Added local flags for enhanced control and clarity, facilitating better customization of the process (Commit Link).
Implemented functionality for saving maximum distance values to skin entities within the skin model part, optimizing the process by eliminating the need for parallel algorithms in this context (Commit Link).
Added a new test case,
test_ComputeDistanceToSkinWithSavedDistanceInSkin
, to ensure the process accurately handles conditions within the skin model part, thereby verifying the enhancements made (Commit Link).