Changeset 13503
- Timestamp:
- 10/02/12 14:44:46 (12 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/geometry/FlagElements.py
r13470 r13503 47 47 else: 48 48 #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) 50 50 51 51 if invert: -
issm/trunk-jpl/src/m/geometry/SegIntersect.py
r13352 r13503 1 1 import numpy 2 from MatlabFuncs import *3 2 4 3 def SegIntersect(seg1,seg2): … … 48 47 49 48 #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: 51 50 52 51 #projection on the axis O1O2 -
issm/trunk-jpl/src/m/parameterization/setflowequation.py
r13462 r13503 123 123 numnodes2d=md.mesh.numberofvertices2d 124 124 numlayers=md.mesh.numberoflayers 125 bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonpattyn[ 1:numnodes2d],nodeonmacayeal[1:numnodes2d]))#Nodes connected to two different types of elements125 bordernodes2d=numpy.nonzero(numpy.logical_and(nodeonpattyn[0:numnodes2d],nodeonmacayeal[0:numnodes2d]))[0]+1 #Nodes connected to two different types of elements 126 126 127 127 #initialize and fill in penalties structure … … 129 129 penalties=numpy.zeros((0,2)) 130 130 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))))) 132 132 md.diagnostic.vertex_pairing=penalties 133 133
Note:
See TracChangeset
for help on using the changeset viewer.