Changeset 17903


Ignore:
Timestamp:
04/30/14 19:33:04 (11 years ago)
Author:
cborstad
Message:

BUG: a couple minor fixes for damage calcs

Location:
issm/trunk-jpl/src/m/mech
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mech/analyticaldamage.py

    r17622 r17903  
    5353        assert len(kwargs)==0, 'error, unexpected or misspelled kwargs'
    5454
    55         if len(sigmab)==1:
     55        if isinstance(sigmab,(int,float)):
    5656                sigmab=sigmab*npy.ones((md.mesh.numberofvertices,))
    5757
     
    8383       
    8484        backstress=npy.zeros((md.mesh.numberofvertices,))
    85        
     85
    8686        # backstress to bring D down to one
    8787        backstress[pos]=T[pos]-(1.-D[pos])*B[pos]*npy.sign(ex[pos])*(2.+a[pos])*npy.abs(ex[pos])**(1./n[pos])/(1.+a[pos]+a[pos]**2)**((n[pos]-1.)/2./n[pos])
  • issm/trunk-jpl/src/m/mech/thomasparams.py

    r17622 r17903  
    134134        elif eq=='Weertman2D':
    135135                theta=1./9
    136                 a=npy.ones((md.mesh.numberofvertices,1))
     136                a=npy.ones((md.mesh.numberofvertices,))
    137137        elif eq=='Thomas':
    138138                theta=((1.+a+a**2+b**2)**((n-1.)/2.))/(npy.abs(2.+a)**n)
Note: See TracChangeset for help on using the changeset viewer.