Changeset 14212 for issm/trunk-jpl/test/NightlyRun/test1108.py
- Timestamp:
- 01/07/13 10:30:35 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/test1108.py
r14134 r14212 8 8 from solve import * 9 9 from MatlabFuncs import * 10 from PythonFuncs import * 10 11 11 12 """ … … 33 34 md.diagnostic.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1)) 34 35 35 pos=numpy.nonzero( numpy.logical_and(md.mesh.vertexonbed,numpy.logical_and(numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y)))))36 pos=numpy.nonzero(logical_and_n(md.mesh.vertexonbed,numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y)))) 36 37 md.diagnostic.spcvx[pos]=0. 37 38 md.diagnostic.spcvy[pos]=0. … … 42 43 posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0] 43 44 44 posy=numpy.nonzero( numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0] #Don't take the same nodes two times45 posy2=numpy.nonzero( numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]45 posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0] #Don't take the same nodes two times 46 posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0] 46 47 47 48 md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1)))) … … 58 59 md.diagnostic.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1)) 59 60 md.diagnostic.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1)) 60 pos=numpy.nonzero( numpy.logical_or(numpy.logical_or(md.mesh.y==0.,md.mesh.x==0.),numpy.logical_or(md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y)))) #Don't take the same nodes two times61 pos=numpy.nonzero(logical_or_n(md.mesh.y==0.,md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y))) #Don't take the same nodes two times 61 62 md.diagnostic.spcvx[pos]=md.results.DiagnosticSolution.Vx[pos] 62 63 md.diagnostic.spcvy[pos]=md.results.DiagnosticSolution.Vy[pos]
Note:
See TracChangeset
for help on using the changeset viewer.