Changeset 17876


Ignore:
Timestamp:
04/29/14 10:36:31 (11 years ago)
Author:
cborstad
Message:

CHG: treat stressbalance spc's as rank-1

Location:
issm/trunk-jpl/src/m/boundaryconditions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.py

    r17480 r17876  
    1515        #node on Dirichlet
    1616        pos=numpy.nonzero(md.mesh.vertexonboundary)
    17         md.stressbalance.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
    18         md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
    19         md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
     17        md.stressbalance.spcvx=float('nan')*numpy.ones(md.mesh.numberofvertices))
     18        md.stressbalance.spcvy=float('nan')*numpy.ones(md.mesh.numberofvertices))
     19        md.stressbalance.spcvz=float('nan')*numpy.ones(md.mesh.numberofvertices))
    2020        md.stressbalance.spcvx[pos]=0
    2121        md.stressbalance.spcvy[pos]=0
  • issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py

    r17686 r17876  
    3333#       pos=find(md.mesh.vertexonboundary & ~nodeonicefront);
    3434        pos=numpy.nonzero(numpy.logical_and(md.mesh.vertexonboundary,numpy.logical_not(nodeonicefront)))[0]
    35         md.stressbalance.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
    36         md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
    37         md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
     35        md.stressbalance.spcvx=float('nan')*numpy.ones(md.mesh.numberofvertices)
     36        md.stressbalance.spcvy=float('nan')*numpy.ones(md.mesh.numberofvertices)
     37        md.stressbalance.spcvz=float('nan')*numpy.ones(md.mesh.numberofvertices)
    3838        md.stressbalance.referential=float('nan')*numpy.ones((md.mesh.numberofvertices,6))
    3939        md.stressbalance.loadingforce=0*numpy.ones((md.mesh.numberofvertices,3))
     
    5959        else:
    6060                pos=numpy.nonzero(md.mesh.vertexonboundary)[0]
    61         md.stressbalance.spcvx[pos[:]]=0
    62         md.stressbalance.spcvy[pos[:]]=0
    63         md.stressbalance.spcvz[pos[:]]=0
     61        md.stressbalance.spcvx[pos]=0
     62        md.stressbalance.spcvy[pos]=0
     63        md.stressbalance.spcvz[pos]=0
    6464                                                                                                                                                                                                                                           
    6565        #Dirichlet Values
  • issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py

    r17870 r17876  
    4242                print "SetMarineIceSheetBC warning: ice front all around the glacier, no dirichlet found. Dirichlet must be added manually."
    4343
    44         md.stressbalance.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices,))
    45         md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices,))
    46         md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices,))
     44        md.stressbalance.spcvx=float('nan')*numpy.ones(md.mesh.numberofvertices)
     45        md.stressbalance.spcvy=float('nan')*numpy.ones(md.mesh.numberofvertices)
     46        md.stressbalance.spcvz=float('nan')*numpy.ones(md.mesh.numberofvertices)
    4747        md.stressbalance.referential=float('nan')*numpy.ones((md.mesh.numberofvertices,6))
    4848        md.stressbalance.loadingforce=0*numpy.ones((md.mesh.numberofvertices,3))
     
    6868        else:
    6969                pos=numpy.nonzero(md.mesh.vertexonboundary)[0]
    70         md.stressbalance.spcvx[pos[:]]=0
    71         md.stressbalance.spcvy[pos[:]]=0
    72         md.stressbalance.spcvz[pos[:]]=0
     70        md.stressbalance.spcvx[pos]=0
     71        md.stressbalance.spcvy[pos]=0
     72        md.stressbalance.spcvz[pos]=0
    7373
    7474        #Dirichlet Values
Note: See TracChangeset for help on using the changeset viewer.