-
Notifications
You must be signed in to change notification settings - Fork 245
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
[RomApp] Adding candidate elements (and/or conditions) to HROM #11577
Conversation
"include_nodal_neighbouring_elements_model_parts_list":[], | ||
"include_minimum_condition": false, | ||
"include_condition_parents": true | ||
"include_condition_parents": false |
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.
In the worst case, it won't use the info of the parent element. Still, it is generally more likely to fail because we need an associated parent element (e.g. Convection-Diffusion, Fluid-Dynamics, CompressiblePotenital).
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.
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.
std::vector<IndexType> RomAuxiliaryUtilities::GetElementIdsInModelPart( | ||
const ModelPart& rModelPart) | ||
{ | ||
std::vector<IndexType> element_ids; | ||
|
||
for (const auto& r_elem : rModelPart.Elements()) { | ||
element_ids.push_back(r_elem.Id()); | ||
} | ||
return element_ids; | ||
} | ||
|
||
std::vector<IndexType> RomAuxiliaryUtilities::GetConditionIdsInModelPart( | ||
const ModelPart& rModelPart) | ||
{ | ||
std::vector<IndexType> condition_ids; | ||
|
||
for (const auto& r_cond : rModelPart.Conditions()) { | ||
condition_ids.push_back(r_cond.Id()); | ||
} | ||
return condition_ids; | ||
} |
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.
Just pointing that these two can be easily done in parallel with an index partition.
📝 Description
This PR will allow to make the element selector algorithm choose from a specific candidate set of elements or conditions. In case choosing the provided candidates the algorithm cannot converge, then the candidate set is expanded to include the rest of the elements and conditions in the computing model part.
It is also possible that by using the provided candidate elements, no solution can be achived that results in all weights positive. In such a case, the algorithm will run again from scratch (ignoring the provided candidates).
🆕 Changelog