Ignore:
Timestamp:
11/22/16 02:33:00 (8 years ago)
Author:
bdef
Message:

CHG: mooving to real vector initialisation (N) in place of (N,1)

File:
1 edited

Legend:

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

    r19527 r21409  
    44#Ok, start defining model parameters here
    55print "      creating thickness"
    6 md.geometry.thickness=10.*numpy.ones((md.mesh.numberofvertices,1))
    7 md.geometry.base=numpy.zeros((md.mesh.numberofvertices,1))
     6md.geometry.thickness=10.*numpy.ones((md.mesh.numberofvertices))
     7md.geometry.base=numpy.zeros((md.mesh.numberofvertices))
    88md.geometry.surface=md.geometry.base+md.geometry.thickness
    99
    1010print "      creating drag"
    11 md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))
    12 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
    13 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
     11md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices))
     12md.friction.p=numpy.ones((md.mesh.numberofelements))
     13md.friction.q=numpy.ones((md.mesh.numberofelements))
    1414
    1515print "      creating temperatures"
    1616tmin=238.15    #K
    1717st=1.67*10**-2/1000.    #k/m
    18 radius=numpy.sqrt((md.mesh.x)**2+(md.mesh.y)**2).reshape(-1,1)
     18radius=numpy.sqrt((md.mesh.x)**2+(md.mesh.y)**2)
    1919md.initialization.temperature=tmin+st*radius
    20 md.basalforcings.geothermalflux=4.2*10**-2*numpy.ones((md.mesh.numberofvertices,1))
     20md.basalforcings.geothermalflux=4.2*10**-2*numpy.ones((md.mesh.numberofvertices))
    2121
    2222print "      creating flow law parameter"
    23 md.materials.rheology_B=6.81*10**7*numpy.ones((md.mesh.numberofvertices,1))    #to have the same B as the analytical solution
    24 md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements,1))
     23md.materials.rheology_B=6.81*10**7*numpy.ones((md.mesh.numberofvertices))    #to have the same B as the analytical solution
     24md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements))
    2525
    2626print "      creating surface mass balance"
     
    3232print "      creating velocities"
    3333constant=0.3
    34 md.inversion.vx_obs=constant/2.*md.mesh.x.reshape(-1,1)*(md.geometry.thickness)**-1
    35 md.inversion.vy_obs=constant/2.*md.mesh.y.reshape(-1,1)*(md.geometry.thickness)**-1
     34md.inversion.vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
     35md.inversion.vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
    3636md.inversion.vel_obs=numpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
    37 md.initialization.vx=numpy.zeros((md.mesh.numberofvertices,1))
    38 md.initialization.vy=numpy.zeros((md.mesh.numberofvertices,1))
    39 md.initialization.vz=numpy.zeros((md.mesh.numberofvertices,1))
    40 md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,1))
     37md.initialization.vx=numpy.zeros((md.mesh.numberofvertices))
     38md.initialization.vy=numpy.zeros((md.mesh.numberofvertices))
     39md.initialization.vz=numpy.zeros((md.mesh.numberofvertices))
     40md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices))
    4141
    4242#Deal with boundary conditions:
Note: See TracChangeset for help on using the changeset viewer.