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] Fix condition creation in sub model part #12364

Merged
merged 2 commits into from
May 9, 2024

Conversation

ddiezrod
Copy link
Contributor

@ddiezrod ddiezrod commented May 8, 2024

📝 Description
I have encountered a problem when trying to create a new condition with a vector of nodes. The current implementation assumes that the nodes belong to the model part, but this is not necessarily the case if it is a submodel part. For some reason, this was fixed for the elements but not for the conditions. I think it makes sense to do the same for both functions (see

if (IsSubModelPart())
)

@ddiezrod ddiezrod requested review from philbucher and a team May 8, 2024 15:38
@ddiezrod ddiezrod self-assigned this May 8, 2024
@ddiezrod ddiezrod requested a review from a team as a code owner May 8, 2024 15:38
Copy link
Member

@loumalouomega loumalouomega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Okay, but maybe wait for the approval of someone from @KratosMultiphysics/technical-committee

@ddiezrod
Copy link
Contributor Author

ddiezrod commented May 8, 2024

Just to be clear, the problem arises when we are in line

pConditionNodes.push_back(pGetNode(ConditionNodeIds[i]));

and we try to do a pGetNode. If it is a submodelpart, it might not have the node.

Copy link
Member

@rubenzorrilla rubenzorrilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes very much sense. Thanks for the fix.

@ddiezrod ddiezrod merged commit e0b14eb into master May 9, 2024
11 checks passed
@ddiezrod ddiezrod deleted the core/fix-creation-of-condition-in-sub-modelpart branch May 9, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants