Skip to content

Commit

Permalink
Merge pull request #961 from KratosMultiphysics/hotfix-mpm-nodes
Browse files Browse the repository at this point in the history
Hotfix mpm nodes
  • Loading branch information
jginternational authored Oct 31, 2023
2 parents d6a40eb + 6357b8a commit f974403
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion kratos.gid/apps/MPM/write/write.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ proc MPM::write::writeModelPartEvent { } {
write::WriteString "End Properties"

# Nodal coordinates
write::writeNodalCoordinatesOnGroups [MPM::write::GetPartsGroups grid]
set list_of_groups [concat [MPM::write::GetPartsGroups grid] [MPM::write::GetConditionsGroups] [MPM::write::GetNodalConditionsGroups]]
write::writeNodalCoordinatesOnGroups $list_of_groups

# Grid element connectivities
writeGridConnectivities
Expand Down Expand Up @@ -147,6 +148,32 @@ proc MPM::write::writeSubmodelparts { type } {
}
}

proc MPM::write::GetConditionsGroups { } {
set xp1 "[spdAux::getRoute [GetAttribute conditions_un]]/condition/group"
set condition_groups [list ]
foreach gNode [[customlib::GetBaseRoot] selectNodes $xp1] {
set group_name [get_domnode_attribute $gNode n]
set good_group_name [write::GetWriteGroupName $group_name]
if {$good_group_name ne $condition_groups} {
lappend condition_groups $good_group_name
}
}
return $condition_groups
}

proc MPM::write::GetNodalConditionsGroups { } {
set xp1 "[spdAux::getRoute [GetAttribute nodal_conditions_un]]/condition/group"
set condition_groups [list ]
foreach gNode [[customlib::GetBaseRoot] selectNodes $xp1] {
set group_name [get_domnode_attribute $gNode n]
set good_group_name [write::GetWriteGroupName $group_name]
if {$good_group_name ne $condition_groups} {
lappend condition_groups $good_group_name
}
}
return $condition_groups
}

proc MPM::write::writeLoads { } {
variable ConditionsDictGroupIterators
set root [customlib::GetBaseRoot]
Expand Down

0 comments on commit f974403

Please sign in to comment.