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/ISMIPF.py

    r17769 r21409  
    66
    77print "      creating thickness"
    8 md.geometry.surface=-md.mesh.x.reshape(-1,1)*numpy.tan(3.*numpy.pi/180.)
     8md.geometry.surface=-md.mesh.x*numpy.tan(3.*numpy.pi/180.)
    99#md.geometry.base=md.geometry.surface-1000.
    10 md.geometry.base=md.geometry.surface-1000.+100.*numpy.exp(-((md.mesh.x.reshape(-1,1)-numpy.max(md.mesh.x)/2.)**2+(md.mesh.y.reshape(-1,1)-numpy.max(md.mesh.y)/2.)**2)/(10000.**2))
     10md.geometry.base=md.geometry.surface-1000.+100.*numpy.exp(-((md.mesh.x-numpy.max(md.mesh.x)/2.)**2+(md.mesh.y-numpy.max(md.mesh.y)/2.)**2)/(10000.**2))
    1111md.geometry.thickness=md.geometry.surface-md.geometry.base
    1212
    1313print "      creating drag"
    14 md.friction.coefficient=numpy.sqrt(md.constants.yts/(2.140373*10**-7*1000.))*numpy.ones((md.mesh.numberofvertices,1))
    15 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
    16 md.friction.q=numpy.zeros((md.mesh.numberofelements,1))
     14md.friction.coefficient=numpy.sqrt(md.constants.yts/(2.140373*10**-7*1000.))*numpy.ones((md.mesh.numberofvertices))
     15md.friction.p=numpy.ones((md.mesh.numberofelements))
     16md.friction.q=numpy.zeros((md.mesh.numberofelements))
    1717
    1818print "      creating flow law parameter"
    19 md.materials.rheology_B=1.4734*10**14*numpy.ones((md.mesh.numberofvertices,1))
    20 md.materials.rheology_n=1.*numpy.ones((md.mesh.numberofelements,1))
     19md.materials.rheology_B=1.4734*10**14*numpy.ones((md.mesh.numberofvertices))
     20md.materials.rheology_n=1.*numpy.ones((md.mesh.numberofelements))
    2121md.materials.rheology_law='None'
    2222
     
    2424#Create node on boundary first (because we cannot use mesh)
    2525md=SetIceSheetBC(md)
    26 md.stressbalance.spcvx=100.*numpy.ones((md.mesh.numberofvertices,1))
    27 md.initialization.vx=numpy.zeros((md.mesh.numberofvertices,1))
    28 md.initialization.vy=numpy.zeros((md.mesh.numberofvertices,1))
    29 md.initialization.vz=numpy.zeros((md.mesh.numberofvertices,1))
    30 md.initialization.vel=numpy.zeros((md.mesh.numberofvertices,1))
    31 md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,1))
    32 md.initialization.temperature=255.*numpy.ones((md.mesh.numberofvertices,1))
     26md.stressbalance.spcvx=100.*numpy.ones((md.mesh.numberofvertices))
     27md.initialization.vx=numpy.zeros((md.mesh.numberofvertices))
     28md.initialization.vy=numpy.zeros((md.mesh.numberofvertices))
     29md.initialization.vz=numpy.zeros((md.mesh.numberofvertices))
     30md.initialization.vel=numpy.zeros((md.mesh.numberofvertices))
     31md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices))
     32md.initialization.temperature=255.*numpy.ones((md.mesh.numberofvertices))
    3333pos=numpy.nonzero(numpy.logical_or(numpy.logical_or(md.mesh.x==numpy.min(md.mesh.x),md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==numpy.min(md.mesh.y),md.mesh.y==numpy.max(md.mesh.y))))
    34 md.balancethickness.spcthickness=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
     34md.balancethickness.spcthickness=float('NaN')*numpy.ones((md.mesh.numberofvertices))
    3535md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos]
    36 md.masstransport.spcthickness=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
     36md.masstransport.spcthickness=float('NaN')*numpy.ones((md.mesh.numberofvertices))
    3737md.masstransport.spcthickness[pos]=md.geometry.thickness[pos]
    38 md.thermal.spctemperature=255.*numpy.ones((md.mesh.numberofvertices,1))
    39 md.basalforcings.geothermalflux=0.4*numpy.ones((md.mesh.numberofvertices,1))
     38md.thermal.spctemperature=255.*numpy.ones((md.mesh.numberofvertices))
     39md.basalforcings.geothermalflux=0.4*numpy.ones((md.mesh.numberofvertices))
    4040
    4141#Parallel options
Note: See TracChangeset for help on using the changeset viewer.