Skip to content

Commit d2676f3

Browse files
write it
1 parent 5bc7077 commit d2676f3

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

kratos.gid/apps/DEM/write/writeMDPA_Walls.tcl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,14 @@ proc DEM::write::writeWallConditionMeshes { } {
306306
if {$::Model::SpatialDimension eq "2D"} {write::WriteString " RIGID_BODY_CENTER_OF_MASS \[3\] ($cX,$cY,0.0)"
307307
} else {write::WriteString " RIGID_BODY_CENTER_OF_MASS \[3\] ($cX,$cY,$cZ)"}
308308

309-
lassign [write::getValueByNode [$group_node selectNodes "./value\[@n='Inertia'\]"]] iX iY iZ
310-
if {$::Model::SpatialDimension eq "2D"} {write::WriteString " RIGID_BODY_INERTIAS \[3\] (0.0,0.0,$iX)"
311-
} else {write::WriteString " RIGID_BODY_INERTIAS \[3\] ($iX,$iY,$iZ)"}
309+
set inertias [write::getValueByNode [$group_node selectNodes "./value\[@n='Inertia'\]"]]
310+
if {$::Model::SpatialDimension eq "2D"} {
311+
set iX $inertias
312+
write::WriteString " RIGID_BODY_INERTIAS \[3\] (0.0,0.0,$iX)"
313+
} else {
314+
lassign $inertias iX iY iZ
315+
write::WriteString " RIGID_BODY_INERTIAS \[3\] ($iX,$iY,$iZ)"
316+
}
312317

313318
# DOFS
314319
set Ax [write::getValueByNode [$group_node selectNodes "./value\[@n='Ax'\]"]]

0 commit comments

Comments
 (0)