source: issm/oecreview/Archive/19101-20495/ISSM-19836-19837.diff@ 20498

Last change on this file since 20498 was 20498, checked in by Mathieu Morlighem, 9 years ago

CHG: done with Archive/19101-20495

File size: 1.3 KB
  • ../trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.js

     
    1717        //node on Dirichlet (boundary and ~icefront)
    1818        if (arguments.length==2){
    1919                icefront=arguments[1];
    20                 nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
     20                nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefront,'node',2);
    2121                nodeonicefront=ArrayAnd(md.mesh.vertexonboundary,nodeinsideicefront);
    2222        }
    2323        else if(arguments.length==1){
     
    5151        var obs=false;
    5252        if((md.inversion.vx_obs.length == md.mesh.numberofvertices) & (md.inversion.vy_obs.length==md.mesh.numberofvertices))obs=true;
    5353
    54 
    5554        if(obs==true){
    5655                console.log('      boundary conditions for stressbalance model: setting spc as observed velocities');
    5756        }
     
    6160        for(var i=0;i<md.mesh.segments.length;i++){
    6261                var sum=0;
    6362                for (var j=0;j<numbernodesfront;j++) sum+=md.mask.ice_levelset[md.mesh.segments[i][j]-1];
    64                 if(sum!=numbernodesfront){
     63                if(sum!=0){
    6564                        for (var j=0;j<numbernodesfront;j++){
    6665                                if(obs==false){
    6766                                        md.stressbalance.spcvx[md.mesh.segments[i][j]-1]=0;
Note: See TracBrowser for help on using the repository browser.