Changeset 15796
- Timestamp:
- 08/12/13 14:18:56 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/boundaryconditions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.m
r15795 r15796 46 46 segments=find(sum(segmentsfront,2)~=numbernodesfront); 47 47 %Find all nodes for these segments and spc them 48 pos= [md.mesh.segments(segments,1:numbernodesfront)];48 pos=md.mesh.segments(segments,1:numbernodesfront); 49 49 md.stressbalance.spcvx(pos(:))=0; 50 50 md.stressbalance.spcvy(pos(:))=0; -
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m
r15795 r15796 41 41 md.stressbalance.loadingforce=0*ones(md.mesh.numberofvertices,3); 42 42 43 44 43 %Position of ice front 45 44 md.mask.icelevelset(find(vertexonicefront))=0; … … 54 53 segments=find(sum(segmentsfront,2)~=numbernodesfront); 55 54 %Find all nodes for these segments and spc them 56 pos= [md.mesh.segments(segments,1:numbernodesfront)];55 pos=md.mesh.segments(segments,1:numbernodesfront); 57 56 md.stressbalance.spcvx(pos(:))=0; 58 57 md.stressbalance.spcvy(pos(:))=0; -
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py
r15771 r15796 43 43 md.stressbalance.spcvy=float('nan')*numpy.ones((md.mesh.numberofvertices,1)) 44 44 md.stressbalance.spcvz=float('nan')*numpy.ones((md.mesh.numberofvertices,1)) 45 md.stressbalance.spcvx[pos]=046 md.stressbalance.spcvy[pos]=047 md.stressbalance.spcvz[pos]=048 45 md.stressbalance.referential=float('nan')*numpy.ones((md.mesh.numberofvertices,6)) 49 46 md.stressbalance.loadingforce=0*numpy.ones((md.mesh.numberofvertices,3)) 47 48 #Position of ice front 49 pos=numpy.nonzero(vertexonicefront)[0] 50 md.mask.icelevelset[pos]=0 51 52 #First find segments that are not completely on the front 53 if md.mesh.dimension==2: 54 numbernodesfront=2 55 else: 56 numbernodesfront=4 57 segmentsfront=numpy.nonzeros(md.mask.icelevelset(md.mesh.segments(:,0:-1))) 58 segments=numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int) 59 #Find all nodes for these segments and spc them 60 pos=md.mesh.segments[segments,0:-1] 61 md.stressbalance.spcvx[pos[:]]=0 62 md.stressbalance.spcvy[pos[:]]=0 63 md.stressbalance.spcvz[pos[:]]=0 50 64 51 65 #Dirichlet Values … … 60 74 pos=numpy.nonzero(md.mesh.vertexonboundary)[0] 61 75 md.hydrology.spcwatercolumn[pos,0]=1 62 63 #Position of ice front64 pos=numpy.nonzero(vertexonicefront)[0]65 md.mask.icelevelset[pos]=066 76 67 77 #Create zeros basalforcings and surfaceforcings
Note:
See TracChangeset
for help on using the changeset viewer.