- Timestamp:
- 08/12/13 15:00:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py ΒΆ
r15771 r15801 35 35 md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices,1)) 36 36 md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices,1)) 37 md.stressbalance.spcvx[pos]=038 md.stressbalance.spcvy[pos]=039 md.stressbalance.spcvz[pos]=040 37 md.stressbalance.referential=float('nan')*numpy.ones((md.mesh.numberofvertices,6)) 41 38 md.stressbalance.loadingforce=0*numpy.ones((md.mesh.numberofvertices,3)) 39 40 #First find segments that are not completely on the front 41 if md.mesh.dimension==2: 42 numbernodesfront=2 43 else: 44 numbernodesfront=4 45 values=md.mask.icelevelset[md.mesh.segments[:,0:-1]] 46 segmentsfront=1-values 47 segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int) 48 #Find all nodes for these segments and spc them 49 pos=md.mesh.segments[segments,0:-1] 50 md.stressbalance.spcvx[pos[:]]=0 51 md.stressbalance.spcvy[pos[:]]=0 52 md.stressbalance.spcvz[pos[:]]=0 42 53 43 54 #Dirichlet Values
Note:
See TracChangeset
for help on using the changeset viewer.