Skip to content

[Core] Add GetModelPart method to ModelPartUtils#14509

Open
sunethwarna wants to merge 4 commits into
masterfrom
core/model_part_utils/add_get_model_part
Open

[Core] Add GetModelPart method to ModelPartUtils#14509
sunethwarna wants to merge 4 commits into
masterfrom
core/model_part_utils/add_get_model_part

Conversation

@sunethwarna

Copy link
Copy Markdown
Member

name: ✨ Feature
about: Adds the ModelPartUtils::GetModelPart method

📝 Description

This PR adds the ModelPartUtils::GetModelPart method which takes either ModelPart, Container pair or Model, Container pair as input. Then the model part or model's model part's sub model parts are recursively checked whether any of them containes the passed Container. If so, returns the first found model part. This checks model part containrs in model part, local mesh, interface mesh, ghost mesh as well. If not found, nullptr is returned.

This is handy specially with TensorAdaptors, where to find the model part which the TensorAdpator belongs to.

🆕 Changelog

  • Adds ModelPartUtils::GetModelPart
  • Exposes to python
  • Adds unit tests

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.

1 participant