-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCallSimpleFunctions.py
More file actions
44 lines (30 loc) · 1.22 KB
/
CallSimpleFunctions.py
File metadata and controls
44 lines (30 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import os
import sys, getopt
import SimpleFunctions as ISF
def main(argv):
try:
opts, args = getopt.getopt(argv, "c:n:b",["ConstitutiveModel=", "NumberElements=", "BCsType="])
except getopt.GetoptError:
print("CallSimpleFunctions.py -c <Constitutive Model> -n <Number of Elements> -b <Type of Boundary Conditions")
sys.exit(2)
c=None
n=None
b=None
for opt, arg in opts:
if opt in ("-c", "--ConstitutiveModel"):
c = arg
if opt in ("-n", "--NumberElements"):
n = arg
if opt in ("-n", "--BCsType"):
b = arg
if None is not in [c, n, b]:
LoadCases = ['Compression', 'Tension', 'SimpleShear']
RelativeWeights = [1,1,1]
FinalRelativeStretch = 0.1
RelativeStepSize = 0.02
ResultsOptimization = ISF.ParametersOptimization(c, int(n), b, LoadCases, RelativeWeights, FinalRelativeStretch, RelativeStepSize)
print(CallSimpleFunctions Ended)
else:
print(c, n, b)
if __name__ == "__main__":
main(sys.argv[1:])