Skip to content

Commit 5789cbf

Browse files
committed
clean up
1 parent 21165ea commit 5789cbf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pystran/model.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
from numpy import array, zeros, dot
77
import pystran.section
88

9+
# These are the designations of degrees of freedom (directions in space), plus a
10+
# special designation for a clamped support.
911
U1 = 0
1012
U2 = 1
1113
U3 = 2
1214
UR1 = 3
1315
UR2 = 4
1416
UR3 = 5
1517
CLAMPED = 100
18+
PINNED = 200
1619

1720

1821
def create(dim=2):
@@ -32,12 +35,10 @@ def create(dim=2):
3235
global UR1
3336
global UR2
3437
global UR3
35-
global CLAMPED
3638
if m["dim"] == 2:
3739
U1 = 0
3840
U2 = 1
3941
UR3 = 2
40-
CLAMPED = 100
4142
U3 = -1000 # invalid
4243
UR1 = -1000 # invalid
4344
UR2 = -1000 # invalid
@@ -48,7 +49,6 @@ def create(dim=2):
4849
UR1 = 3
4950
UR2 = 4
5051
UR3 = 5
51-
CLAMPED = 100
5252
return m
5353

5454

@@ -101,6 +101,8 @@ def add_support(j, dof, value=0.0):
101101
j["supports"] = dict()
102102
if dof == CLAMPED:
103103
j["supports"] = {U1: 0.0, U2: 0.0, U3: 0.0, UR1: 0.0, UR2: 0.0, UR3: 0.0}
104+
elif dof == PINNED:
105+
j["supports"] = {U1: 0.0, U2: 0.0, U3: 0.0}
104106
else:
105107
j["supports"][dof] = value
106108
return None

0 commit comments

Comments
 (0)