Ignore:
Timestamp:
08/12/13 17:11:24 (12 years ago)
Author:
seroussi
Message:

BUG: trying to fix python BC

File:
1 edited

Legend:

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

    r15806 r15807  
    4747        else:
    4848                numbernodesfront=4
    49         values=md.mask.icelevelset[md.mesh.segments[:,0:-1]]
    50         segmentsfront=1-values
    51         segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int)
    52         #Find all nodes for these segments and spc them
    53         pos=md.mesh.segments[segments,0:-1]
     49        if any(md.mask.icelevelset<=0):
     50                values=md.mask.icelevelset[md.mesh.segments[:,0:-1]]
     51                segmentsfront=1-values
     52                segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int)
     53                #Find all nodes for these segments and spc them
     54                pos=md.mesh.segments[segments,0:-1]
     55        else:
     56                pos=numpy.nonzero(md.mesh.vertexonboundary)[0]
    5457        md.stressbalance.spcvx[pos[:]]=0
    5558        md.stressbalance.spcvy[pos[:]]=0
Note: See TracChangeset for help on using the changeset viewer.