diff --git a/kratos.gid/apps/MPM/write/write.tcl b/kratos.gid/apps/MPM/write/write.tcl index 688c2f82e..6ea310010 100644 --- a/kratos.gid/apps/MPM/write/write.tcl +++ b/kratos.gid/apps/MPM/write/write.tcl @@ -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 @@ -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]