-
Notifications
You must be signed in to change notification settings - Fork 244
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
New Rom Utility Functions #12274
New Rom Utility Functions #12274
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.
Some minor comments. Here's another one, note that you are using both neighbOUr (UK) and neighbOr (US) interchangeably.
return Kratos::RomAuxiliaryUtilities::GetNodalNeighbouringElementIds(rModelPart, rGivenModelPart);}) | ||
.def_static("GetNodalNeighbouringElementIds", [](Kratos::ModelPart& rModelPart, const std::vector<Kratos::IndexType>& rNodeIds, bool retrieveSingleNeighbour) { | ||
return Kratos::RomAuxiliaryUtilities::GetNodalNeighbouringElementIds(rModelPart, rNodeIds, retrieveSingleNeighbour);}) | ||
.def_static("GetNodalNeighbouringConditionIds", &RomAuxiliaryUtilities::GetNodalNeighbouringConditionIds) | ||
.def_static("GetConditionIdsNotInHRomModelPart", &RomAuxiliaryUtilities::GetConditionIdsNotInHRomModelPart) |
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.
why are we adding a return here? I had not seen return in other pybind stuff
const auto& r_elem = r_neigh_elements[i]; | ||
parent_ids_set.insert(r_elem.Id() - 1); | ||
break; | ||
} |
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.
This +1 in the condId(line 513) and r_elem.Id()-1 in line 519 are related to the difference in ids in numpy and in Kratos? let us mark it as #FIXME, to have it in mind for an upcoming PR fixing all these indexes
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.
LGTM
PR Description
This PR introduces a set of new utility functions to the
RomAuxiliaryUtilities
class.Description
GetHRomConditionParentsIds
GetNodalNeighbouringElementIds
GetNodalNeighbouringConditionIds
GetNodalNeighbouringElementIds
but targets conditions adjacent to given nodes.These utilities were particularly valuable for cosimulation scenarios where the transfer on the interface becomes a challenge.