Ignore:
Timestamp:
09/27/12 09:44:58 (12 years ago)
Author:
jschierm
Message:

CHG: Changed all data 1-d vectors to 2-d arrays to allow multiple columns.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/parameterization/setflowequation.py

    r13244 r13462  
    9494                                              numpy.logical_not(numpy.isnan(md.diagnostic.spcvy)).astype(int)+ \
    9595                                              numpy.logical_not(numpy.isnan(md.diagnostic.spcvz)).astype(int)==3, \
    96                                               numpy.logical_and(nodeonpattyn,nodeonstokes)).astype(int)    #find all the nodes on the boundary of the domain without icefront
     96                                              numpy.logical_and(nodeonpattyn,nodeonstokes).reshape(-1,1)).astype(int)    #find all the nodes on the boundary of the domain without icefront
    9797#               fullspcelems=double(sum(fullspcnodes(md.mesh.elements),2)==6);         %find all the nodes on the boundary of the domain without icefront
    9898                fullspcelems=(numpy.sum(fullspcnodes[md.mesh.elements.astype(int)-1],axis=1)==6).astype(int)    #find all the nodes on the boundary of the domain without icefront
    99                 stokesflag[numpy.nonzero(fullspcelems)]=0
     99                stokesflag[numpy.nonzero(fullspcelems.reshape(-1))]=0
    100100                nodeonstokes[md.mesh.elements[numpy.nonzero(stokesflag),:].astype(int)-1]=1
    101101
     
    129129                        penalties=numpy.zeros((0,2))
    130130                        for     i in xrange(1,numlayers):
    131                                 penalties=numpy.concatenate((penalties,numpy.concatenate((bordernodes2d,bordernodes2d+md.mesh.numberofvertices2d*(i)),axis=1)),axis=0)
     131                                penalties=numpy.vstack((penalties,numpy.hstack((bordernodes2d,bordernodes2d+md.mesh.numberofvertices2d*(i)))))
    132132                        md.diagnostic.vertex_pairing=penalties
    133133
Note: See TracChangeset for help on using the changeset viewer.