Ignore:
Timestamp:
06/07/17 10:50:54 (8 years ago)
Author:
Eric.Larour
Message:

CHG: merged branch back to trunk-jpl 21754.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-NatGeoScience2016/test/NightlyRun/test423.py

    r21060 r21759  
    11#Test Name: RoundSheetShelfGLMigrationSSA2d
    2 import numpy
     2import numpy as np
    33from model import *
     4from socket import gethostname
    45from roundmesh import *
    56from setmask import *
     
    78from setflowequation import *
    89from solve import *
    9 from MatlabFuncs import *
     10
    1011
    1112radius=1.e6
     
    1415md=roundmesh(model(),radius,50000.)
    1516#fix center node to 0,0
    16 rad=numpy.sqrt(md.mesh.x**2+md.mesh.y**2)
    17 pos=numpy.argmin(rad)
     17rad=np.sqrt(md.mesh.x**2+md.mesh.y**2)
     18pos=np.argmin(rad)
    1819md.mesh.x[pos]=0.
    1920md.mesh.y[pos]=0.    #the closest node to the center is changed to be exactly at the center
    20 xelem=numpy.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
    21 yelem=numpy.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
    22 rad=numpy.sqrt(xelem**2+yelem**2)
    23 flags=numpy.zeros(md.mesh.numberofelements)
    24 pos=numpy.nonzero(rad>=(radius-shelfextent))
     21xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
     22yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
     23rad=np.sqrt(xelem**2+yelem**2)
     24flags=np.zeros(md.mesh.numberofelements)
     25pos=np.nonzero(rad>=(radius-shelfextent))
    2526flags[pos]=1
    2627md=setmask(md,flags,'')
    2728md=parameterize(md,'../Par/RoundSheetShelf.py')
    2829md=setflowequation(md,'SSA','all')
    29 md.cluster=generic('name',oshostname(),'np',3)
     30md.cluster=generic('name',gethostname(),'np',3)
    3031
    3132md.transient.isthermal=False
Note: See TracChangeset for help on using the changeset viewer.