Changeset 14095


Ignore:
Timestamp:
12/04/12 10:53:24 (12 years ago)
Author:
jschierm
Message:

CHG: Updates for python tests 1401 and 1402.

Location:
issm/trunk-jpl/src/m
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/ComputeMetric.py

    r13482 r14095  
    5454        #take care of NaNs if any (use Numpy eig in a loop)
    5555        pos=numpy.nonzero(numpy.isnan(metric))[0]
    56         if pos:
     56        if numpy.size(pos):
    5757                print(" %i NaN found in the metric. Use Numpy routine..." % numpy.size(pos))
    5858                for posi in pos:
  • issm/trunk-jpl/src/m/mesh/squaremesh.py

    r14092 r14095  
    2222        #initialization
    2323        index=numpy.zeros((nel,3),int)
    24         x=numpy.zeros((nx*ny,1))
    25         y=numpy.zeros((nx*ny,1))
     24        x=numpy.zeros((nx*ny))
     25        y=numpy.zeros((nx*ny))
    2626
    2727        #create coordinates
     
    5959        md.mesh.x=x
    6060        md.mesh.y=y
    61         md.mesh.z=numpy.zeros((nods,1))
     61        md.mesh.z=numpy.zeros((nods))
    6262        md.mesh.numberofvertices=nods
    63         md.mesh.vertexonboundary=numpy.zeros((nods,1),bool)
     63        md.mesh.vertexonboundary=numpy.zeros((nods),bool)
    6464        md.mesh.vertexonboundary[segments[:,0:2]-1]=True
    65         md.mesh.vertexonbed=numpy.ones((nods,1),bool)
    66         md.mesh.vertexonsurface=numpy.ones((nods,1),bool)
     65        md.mesh.vertexonbed=numpy.ones((nods),bool)
     66        md.mesh.vertexonsurface=numpy.ones((nods),bool)
    6767
    6868        #plug elements
     
    7070        md.mesh.segments=segments
    7171        md.mesh.numberofelements=nel
    72         md.mesh.elementonbed=numpy.ones((nel,1),bool)
    73         md.mesh.elementonsurface=numpy.ones((nel,1),bool)
     72        md.mesh.elementonbed=numpy.ones((nel),bool)
     73        md.mesh.elementonsurface=numpy.ones((nel),bool)
    7474
    7575        #Now, build the connectivity tables for this mesh.
  • issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py

    r13482 r14095  
    88
    99        if 'Windows' in platform.system():
     10                return True
     11        else:
     12                return False
     13
     14def ismac():
     15        import platform
     16
     17        if 'Darwin' in platform.system():
    1018                return True
    1119        else:
Note: See TracChangeset for help on using the changeset viewer.