Changeset 14095
- Timestamp:
- 12/04/12 10:53:24 (12 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/ComputeMetric.py
r13482 r14095 54 54 #take care of NaNs if any (use Numpy eig in a loop) 55 55 pos=numpy.nonzero(numpy.isnan(metric))[0] 56 if pos:56 if numpy.size(pos): 57 57 print(" %i NaN found in the metric. Use Numpy routine..." % numpy.size(pos)) 58 58 for posi in pos: -
issm/trunk-jpl/src/m/mesh/squaremesh.py
r14092 r14095 22 22 #initialization 23 23 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)) 26 26 27 27 #create coordinates … … 59 59 md.mesh.x=x 60 60 md.mesh.y=y 61 md.mesh.z=numpy.zeros((nods ,1))61 md.mesh.z=numpy.zeros((nods)) 62 62 md.mesh.numberofvertices=nods 63 md.mesh.vertexonboundary=numpy.zeros((nods ,1),bool)63 md.mesh.vertexonboundary=numpy.zeros((nods),bool) 64 64 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) 67 67 68 68 #plug elements … … 70 70 md.mesh.segments=segments 71 71 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) 74 74 75 75 #Now, build the connectivity tables for this mesh. -
issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py
r13482 r14095 8 8 9 9 if 'Windows' in platform.system(): 10 return True 11 else: 12 return False 13 14 def ismac(): 15 import platform 16 17 if 'Darwin' in platform.system(): 10 18 return True 11 19 else:
Note:
See TracChangeset
for help on using the changeset viewer.