Skip to content

Commit f1f0ed0

Browse files
committed
Added procedure to create and assign bonded domains to all volumes
1 parent 92105ce commit f1f0ed0

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

kratos.gid/apps/CDEM/start.tcl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,23 @@ proc ::CDEM::CustomToolbarItems { } {
6565
}
6666
}
6767

68+
proc ::CDEM::CreateAndAssign3DBondedGroups { } {
69+
70+
# This procedure can be called from the command line of GiD, after loading the CDEM problemtype, just by typing:
71+
# -np- ::CDEM::CreateAndAssign3DBondedGroups
72+
73+
set volume_list [GiD_Geometry -v2 list volume]
74+
75+
for {set i 0} {$i < [llength $volume_list]} {incr i} {
76+
77+
set volume_id [lindex $volume_list $i]
78+
GiD_Groups create Bonded_domain_groups//SG$volume_id
79+
GiD_EntitiesGroups assign Bonded_domain_groups//SG$volume_id volumes $volume_id
80+
81+
set DEMConditions [spdAux::getRoute "DEMConditions"]
82+
set cohesive_cond "$DEMConditions/condition\[@n='DEM-Cohesive'\]"
83+
set cohesive_group [customlib::AddConditionGroupOnXPath $cohesive_cond Bonded_domain_groups//SG$volume_id]
84+
}
85+
}
86+
6887
::CDEM::Init

0 commit comments

Comments
 (0)