Changeset 13503


Ignore:
Timestamp:
10/02/12 14:44:46 (12 years ago)
Author:
jschierm
Message:

FIX: Fixes required for test205.py.

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/geometry/FlagElements.py

    r13470 r13503  
    4747                        else:
    4848                                #ok, flag elements
    49                                 [flag,dum]=ContourToMesh(md.mesh.elements[:,0:3],md.mesh.x.reshape(-1,1),md.mesh.y.reshape(-1,1),region,'element',1)
     49                                [flag,dum]=ContourToMesh(md.mesh.elements[:,0:3].copy(),md.mesh.x.reshape(-1,1),md.mesh.y.reshape(-1,1),region,'element',1)
    5050
    5151                if invert:
  • issm/trunk-jpl/src/m/geometry/SegIntersect.py

    r13352 r13503  
    11import numpy
    2 from MatlabFuncs import *
    32
    43def SegIntersect(seg1,seg2):
     
    4847
    4948        #if colinear
    50         if test1*test2==0 and test3*test4==0 and det(numpy.hstack((n1.reshape((-1,1)),n2.reshape(-1,1))))==0:
     49        if test1*test2==0 and test3*test4==0 and numpy.linalg.det(numpy.hstack((n1.reshape((-1,1)),n2.reshape(-1,1))))==0:
    5150
    5251                #projection on the axis O1O2
  • issm/trunk-jpl/src/m/parameterization/setflowequation.py

    r13462 r13503  
    123123                numnodes2d=md.mesh.numberofvertices2d
    124124                numlayers=md.mesh.numberoflayers
    125                 bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonpattyn[1:numnodes2d],nodeonmacayeal[1:numnodes2d]))    #Nodes connected to two different types of elements
     125                bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonpattyn[0:numnodes2d],nodeonmacayeal[0:numnodes2d]))[0]+1    #Nodes connected to two different types of elements
    126126
    127127                #initialize and fill in penalties structure
     
    129129                        penalties=numpy.zeros((0,2))
    130130                        for     i in xrange(1,numlayers):
    131                                 penalties=numpy.vstack((penalties,numpy.hstack((bordernodes2d,bordernodes2d+md.mesh.numberofvertices2d*(i)))))
     131                                penalties=numpy.vstack((penalties,numpy.hstack((bordernodes2d.reshape(-1,1),bordernodes2d.reshape(-1,1)+md.mesh.numberofvertices2d*(i)))))
    132132                        md.diagnostic.vertex_pairing=penalties
    133133
Note: See TracChangeset for help on using the changeset viewer.