Révision 98
Ising/MP/Ising2D-MP.py (revision 98) | ||
---|---|---|
106 | 106 |
try: |
107 | 107 |
opts, args = getopt.getopt(sys.argv[1:],"hcj:b:z:i:s:e:p:u:",["coupling=","magneticfield=","size=","iterations=","tempstart=","tempend=","tempstep=","units"]) |
108 | 108 |
except getopt.GetoptError: |
109 |
print '%s -j <Coupling Factor> -b <Magnetic Field> -z <Size of Square Lattice> -i <Iterations> -s <Minimum Temperature> -e <Maximum Temperature> -p <steP Temperature> -u <Unit of process> -c (Print Curves)' % sys.argv[0]
|
|
109 |
print '%s -j <Coupling Factor> -b <Magnetic Field> -z <Size of Square Lattice> -i <Iterations> -s <Minimum Temperature> -e <Maximum Temperature> -p <steP Temperature> -u <Units of processing> -c (Print Curves)' % sys.argv[0]
|
|
110 | 110 |
sys.exit(2) |
111 | 111 |
|
112 | 112 |
for opt, arg in opts: |
113 | 113 |
if opt == '-h': |
114 |
print '%s -j <Coupling Factor> -b <Magnetic Field> -z <Size of Square Lattice> -i <Iterations> -s <Minimum Temperature> -e <Maximum Temperature> -p <steP Temperature> -c (Print Curves)' % sys.argv[0] |
|
114 |
print '%s -j <Coupling Factor> -b <Magnetic Field> -z <Size of Square Lattice> -i <Iterations> -s <Minimum Temperature> -e <Maximum Temperature> -p <steP Temperature> -u <Units of Processing> -c (Print Curves)' % sys.argv[0]
|
|
115 | 115 |
sys.exit() |
116 | 116 |
elif opt == '-c': |
117 | 117 |
Curves=True |
... | ... | |
129 | 129 |
Iterations = int(arg) |
130 | 130 |
elif opt in ("-z", "--size"): |
131 | 131 |
Size = int(arg) |
132 |
elif opt in ("-u", "--unit"): |
|
132 |
elif opt in ("-u", "--units"):
|
|
133 | 133 |
Procs = int(arg) |
134 | 134 |
|
135 | 135 |
print "Process Units : %s" % Procs |
Formats disponibles : Unified diff