Changeset 15993


Ignore:
Timestamp:
08/28/13 10:32:57 (12 years ago)
Author:
Mathieu Morlighem
Message:

BUG: ice front needs to be extended so that it covers the elements that are partially floating

File:
1 edited

Legend:

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

    r15987 r15993  
    2323                error(['SetMarineIceSheetBC error message: ice front file ' icefrontfile ' not found']);
    2424        end
    25         nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
    26         vertexonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
     25        incontour=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
     26        vertexonicefront=double(md.mesh.vertexonboundary & incontour);
    2727else
    2828        %Guess where the ice front is
    29         vertexonfloatingice=(md.mask.groundedice_levelset<0.);
     29        pos=find(sum(md.mask.groundedice_levelset(md.mesh.elements)<0.,2) >0.);
     30        vertexonfloatingice=zeros(md.mesh.numberofvertices,1);
     31        vertexonfloatingice(md.mesh.elements(pos,:))=1.;
    3032        vertexonicefront=double(md.mesh.vertexonboundary & vertexonfloatingice);
    3133end
Note: See TracChangeset for help on using the changeset viewer.