Changeset 12848
- Timestamp:
- 07/31/12 18:22:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/Par/SquareShelfConstrained.py
r12124 r12848 18 18 #Initial velocity 19 19 mat=matio.loadmat('../Data/SquareShelfConstrained.data') 20 #Reshape as Rank-1 arrays 21 x=reshape(mat['x'],(size(mat['x']),)) 22 y=reshape(mat['y'],(size(mat['y']),)) 23 vx=mat['vx'] 24 vy=mat['vy'] 20 25 #deal with 'F' oriented matlab matrices! 21 26 index=mat['index'].astype(float) 22 27 index=reshape(index.T,(len(index),3),order='F') 23 28 24 md.initialization.vx = im.InterpFromMeshToMesh2d(index, mat['x'], mat['y'], mat['vx'], md.mesh.x, md.mesh.y)25 md.initialization.vy = im.InterpFromMeshToMesh2d(index, mat['x'], mat['y'], mat['vy'], md.mesh.x, md.mesh.y)29 md.initialization.vx = im.InterpFromMeshToMesh2d(index, x, y, vx, md.mesh.x, md.mesh.y) 30 md.initialization.vy = im.InterpFromMeshToMesh2d(index, x, y, vy, md.mesh.x, md.mesh.y) 26 31 md.initialization.vz = zeros(md.mesh.numberofvertices) 27 32 md.initialization.pressure = zeros(md.mesh.numberofvertices)
Note:
See TracChangeset
for help on using the changeset viewer.