Skip to content

Commit 401611e

Browse files
Minor details for safety
1 parent 5e62c6f commit 401611e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

kratos.gid/apps/CDEM/examples/BulkGroup.tcl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,28 @@ proc ::CDEM::examples::BulkGroup {args} {
1818
GidUtils::UpdateWindow GROUPS
1919
GidUtils::UpdateWindow LAYER
2020
GiD_Process 'Zoom Frame
21+
22+
spdAux::RequestRefresh
2123
}
2224

2325
proc ::CDEM::examples::CreateAndAssignBondedGroups { } {
26+
2427
# Prepare the variables
2528
set entity surface
2629
set condition_id "DEM-Cohesive2D"
2730
if {$::Model::SpatialDimension eq "3D"} {
2831
set entity volume
2932
set condition_id "DEM-Cohesive"
3033
}
34+
set group_base Bonded_domain_groups
3135
# Locate the condition
3236
set DEMConditions [spdAux::getRoute "DEMConditions"]
3337
set cohesive_cond "$DEMConditions/condition\[@n='$condition_id'\]"
3438

39+
# Clear previous assignations
40+
if {[GiD_Groups exists $group_base]} {GiD_Groups delete $group_base}
41+
gid_groups_conds::delete "$cohesive_cond/group"
42+
3543
# Get the list of entities (surfaces/volumes)
3644
set entity_list [GiD_Geometry -v2 list $entity]
3745
# Foreach entity, create subgroup and assign it to the condition
@@ -40,7 +48,7 @@ proc ::CDEM::examples::CreateAndAssignBondedGroups { } {
4048
# Get the entity id
4149
set entity_id [objarray get $entity_list $i]
4250
# Create the subgroup
43-
set group_id "Bonded_domain_groups//SG$entity_id"
51+
set group_id "$group_base//SG$entity_id"
4452
GiD_Groups create $group_id
4553
# Assign entity to subgroup
4654
GiD_EntitiesGroups assign $group_id volumes $entity_id

0 commit comments

Comments
 (0)