Rev | Line | |
---|
[17986] | 1 | Index: ../trunk-jpl/src/m/materials/paterson.py
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/materials/paterson.py (revision 17863)
|
---|
| 4 | +++ ../trunk-jpl/src/m/materials/paterson.py (revision 17864)
|
---|
| 5 | @@ -15,9 +15,12 @@
|
---|
| 6 | raise RuntimeError("input temperature should be in Kelvin (positive)")
|
---|
| 7 |
|
---|
| 8 | if numpy.ndim(temperature)==2:
|
---|
| 9 | - T = temperature.reshape(-1,)-273.15
|
---|
| 10 | + #T = temperature.reshape(-1,)-273.15
|
---|
| 11 | + T = temperature.flatten()-273.15
|
---|
| 12 | + elif isinstance(temperature,float) or isinstance(temperature,int):
|
---|
| 13 | + T = numpy.array([temperature])-273.15
|
---|
| 14 | else:
|
---|
| 15 | - T = numpy.array([temperature])-273.15
|
---|
| 16 | + T = temperature-273.15
|
---|
| 17 |
|
---|
| 18 | #The routine below is equivalent to:
|
---|
| 19 |
|
---|
| 20 | @@ -70,7 +73,7 @@
|
---|
| 21 | #Now make sure that rigidity is positive
|
---|
| 22 | pos=numpy.nonzero(rigidity<0)[0]
|
---|
| 23 | if len(pos):
|
---|
| 24 | - rigidity[pos]=1**6
|
---|
| 25 | + rigidity[pos]=1.e6
|
---|
| 26 |
|
---|
| 27 | return rigidity
|
---|
| 28 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.