Skip to content

Commit

Permalink
[Core] Fix condition creation in sub model part (#12364)
Browse files Browse the repository at this point in the history
* fix condition creation in sub model part

* Fix spacing

---------

Co-authored-by: Daniel Diez <ddiez@altair.com>
Co-authored-by: Vicente Mataix Ferrándiz <vmataix@altair.com>
  • Loading branch information
3 people authored May 9, 2024
1 parent 44468d2 commit e0b14eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kratos/sources/model_part.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,13 @@ ModelPart::ConditionType::Pointer ModelPart::CreateNewCondition(std::string Cond
ModelPart::PropertiesType::Pointer pProperties, ModelPart::IndexType ThisIndex)
{
KRATOS_TRY

if (IsSubModelPart()) {
ConditionType::Pointer p_new_condition = mpParentModelPart->CreateNewCondition(ConditionName, Id, ConditionNodeIds, pProperties, ThisIndex);
GetMesh(ThisIndex).AddCondition(p_new_condition);
return p_new_condition;
}

Geometry< Node >::PointsArrayType pConditionNodes;

for (unsigned int i = 0; i < ConditionNodeIds.size(); i++)
Expand Down

0 comments on commit e0b14eb

Please sign in to comment.