Skip to content

Commit 769b6c3

Browse files
Merge pull request #694 from KratosMultiphysics/dem/parts-over-entities-2d-3d
[dem] Parts can select different types of entities depending on number of dimensions
2 parents a1830a6 + d14b9c3 commit 769b6c3

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

kratos.gid/apps/DEM/xml/Parts.spd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<condition n="Parts" pn="Parts" ov="point,line,surface,volume" ovm="node,element" icon="shells16" help="Select your group" un="DEMParts">
3+
<condition n="Parts" pn="Parts" ov="[GetDEMPartsOvWhat]" ovm="node,element" icon="shells16" help="Select your group" un="DEMParts">
44
<value n="Element" pn="Element" actualize="1" values="" v="" dict="[GetElements ElementType DEM]" help="Select an element" state="hidden">
55
<dependencies node="../value[@n = 'ConstitutiveLaw']" actualize="1" />
66
</value>

kratos.gid/apps/DEM/xml/Procs.spd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
return [DEM::xml::ProcGetElements $domNode $args]
66
]]>
77
</proc>
8-
<proc n='getStateBoundingBoxParams' args='args'>
8+
<proc n='getStateBoundingBoxParams' args='args'>
99
<![CDATA[
1010
return [DEM::xml::ProcGetStateBoundingBoxParams $domNode $args]
1111
]]>
1212
</proc>
13+
<proc n='GetDEMPartsOvWhat' args='args'>
14+
<![CDATA[
15+
return [DEM::xml::ProcGetDEMPartsOvWhat $domNode $args]
16+
]]>
17+
</proc>
1318
</container>
1419

1520

kratos.gid/apps/DEM/xml/XmlController.tcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ proc DEM::xml::ProcGetStateBoundingBoxParams { domNode args } {
8787
return $ret
8888
}
8989

90+
proc DEM::xml::ProcGetDEMPartsOvWhat { domNode args } {
91+
if {$::Model::SpatialDimension eq "2D"} {
92+
return "point,line,surface"
93+
} else {
94+
return "point,line,surface,volume"
95+
}
96+
}
97+
9098

9199

92100
DEM::xml::Init

0 commit comments

Comments
 (0)