Changeset 15795


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

CHG: added spcs on the border of ice front to get coherent boundary conditions

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

Legend:

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

    r15771 r15795  
    3131md.stressbalance.spcvy=NaN*ones(md.mesh.numberofvertices,1);
    3232md.stressbalance.spcvz=NaN*ones(md.mesh.numberofvertices,1);
    33 md.stressbalance.spcvx(pos)=0;
    34 md.stressbalance.spcvy(pos)=0;
    35 md.stressbalance.spcvz(pos)=0;
    3633md.stressbalance.referential=NaN*ones(md.mesh.numberofvertices,6);
    3734md.stressbalance.loadingforce=0*ones(md.mesh.numberofvertices,3);
     35
     36%Ice front position:
     37md.mask.icelevelset(find(nodeonicefront))=0;
     38
     39%First find segments that are not completely on the front
     40if(md.mesh.dimension==2),
     41        numbernodesfront=2;
     42else
     43        numbernodesfront=4;
     44end
     45segmentsfront=md.mask.icelevelset(md.mesh.segments(:,1:numbernodesfront))==0;
     46segments=find(sum(segmentsfront,2)~=numbernodesfront);
     47%Find all nodes for these segments and spc them
     48pos=[md.mesh.segments(segments,1:numbernodesfront)];
     49md.stressbalance.spcvx(pos(:))=0;
     50md.stressbalance.spcvy(pos(:))=0;
     51md.stressbalance.spcvz(pos(:))=0;
    3852
    3953%Dirichlet Values
     
    4559        disp('      boundary conditions for stressbalance model: spc set as zero');
    4660end
    47 
    48 %Ice front position
    49 md.mask.icelevelset(find(nodeonicefront))=0;
    5061
    5162%Create zeros basalforcings and surfaceforcings
  • issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m

    r15771 r15795  
    3838md.stressbalance.spcvy=NaN*ones(md.mesh.numberofvertices,1);
    3939md.stressbalance.spcvz=NaN*ones(md.mesh.numberofvertices,1);
    40 md.stressbalance.spcvx(pos)=0;
    41 md.stressbalance.spcvy(pos)=0;
    42 md.stressbalance.spcvz(pos)=0;
    4340md.stressbalance.referential=NaN*ones(md.mesh.numberofvertices,6);
    4441md.stressbalance.loadingforce=0*ones(md.mesh.numberofvertices,3);
     42
     43
     44%Position of ice front
     45md.mask.icelevelset(find(vertexonicefront))=0;
     46
     47%First find segments that are not completely on the front
     48if(md.mesh.dimension==2),
     49        numbernodesfront=2;
     50else
     51        numbernodesfront=4;
     52end
     53segmentsfront=md.mask.icelevelset(md.mesh.segments(:,1:numbernodesfront))==0;
     54segments=find(sum(segmentsfront,2)~=numbernodesfront);
     55%Find all nodes for these segments and spc them
     56pos=[md.mesh.segments(segments,1:numbernodesfront)];
     57md.stressbalance.spcvx(pos(:))=0;
     58md.stressbalance.spcvy(pos(:))=0;
     59md.stressbalance.spcvz(pos(:))=0;
    4560
    4661%Dirichlet Values
     
    5671pos=find(md.mesh.vertexonboundary);
    5772md.hydrology.spcwatercolumn(pos,1)=1;
    58 
    59 %Position of ice front
    60 md.mask.icelevelset(find(vertexonicefront))=0;
    6173
    6274%Create zeros basalforcings and surfaceforcings
Note: See TracChangeset for help on using the changeset viewer.