Changeset 12848


Ignore:
Timestamp:
07/31/12 18:22:37 (13 years ago)
Author:
cborstad
Message:

reshaped x and y arrays to rank-1 for InterpFromMeshToMesh2d

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/Par/SquareShelfConstrained.py

    r12124 r12848  
    1818#Initial velocity
    1919mat=matio.loadmat('../Data/SquareShelfConstrained.data')
     20#Reshape as Rank-1 arrays
     21x=reshape(mat['x'],(size(mat['x']),))
     22y=reshape(mat['y'],(size(mat['y']),))
     23vx=mat['vx']
     24vy=mat['vy']
    2025#deal with 'F' oriented matlab matrices!
    2126index=mat['index'].astype(float)
    2227index=reshape(index.T,(len(index),3),order='F')
    2328
    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)
     29md.initialization.vx = im.InterpFromMeshToMesh2d(index, x, y, vx, md.mesh.x, md.mesh.y)
     30md.initialization.vy = im.InterpFromMeshToMesh2d(index, x, y, vy, md.mesh.x, md.mesh.y)
    2631md.initialization.vz = zeros(md.mesh.numberofvertices)
    2732md.initialization.pressure = zeros(md.mesh.numberofvertices)
Note: See TracChangeset for help on using the changeset viewer.