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

Correct AssignMasterSlaveConstraintsToNeighboursProcess and Remove Trailing Spaces #11629

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

SADPR
Copy link
Contributor

@SADPR SADPR commented Sep 29, 2023

Description:

This pull request addresses a correction in the AssignMasterSlaveConstraintsToNeighboursProcess. The previous implementation contained an error where the self.variables_list was being looped over and passed individually to the AssignMasterSlaveConstraintsToNodes method when self.reform_constraints_at_each_step was False. This was incorrect as the entire self.variables_list should be passed as a parameter to the AssignMasterSlaveConstraintsToNodes method.

Changes:

Correct the AssignMasterSlaveConstraintsToNeighboursProcess by passing the entire self.variables_list as a parameter to the AssignMasterSlaveConstraintsToNodes method when self.reform_constraints_at_each_step is False.

# Before
if not self.reform_constraints_at_each_step:
    for variable in self.variables_list:
        self.assign_mscs_utility.AssignMasterSlaveConstraintsToNodes(self.slave_model_part.Nodes,self.search_radius,self.computing_model_part, variable, self.minimum_number_of_neighbouring_nodes)

# After
if not self.reform_constraints_at_each_step:
    self.assign_mscs_utility.AssignMasterSlaveConstraintsToNodes(self.slave_model_part.Nodes,self.search_radius,self.computing_model_part, self.variables_list, self.minimum_number_of_neighbouring_nodes)

Also: Removed trailing spaces in the modified files for a cleaner codebase.

@SADPR SADPR requested a review from a team as a code owner September 29, 2023 08:23
@SADPR SADPR added Kratos Core FastPR This Pr is simple and / or has been already tested and the revision should be fast labels Sep 29, 2023
@SADPR SADPR merged commit 63cbe34 into master Sep 29, 2023
@SADPR SADPR deleted the Kratos_amstnp_fast_pr branch September 29, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FastPR This Pr is simple and / or has been already tested and the revision should be fast Kratos Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants