Changeset 1308


Ignore:
Timestamp:
07/14/09 14:54:56 (16 years ago)
Author:
Eric.Larour
Message:

NaN variant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/BasinConstrain.m

    r1244 r1308  
    5757numpos=unique(md.elements(pos,:));
    5858grids=setdiff(1:1:md.numberofgrids,numpos);
    59 
    6059md.gridondirichlet_diag(grids)=1;
    6160md.dirichletvalues_diag(grids,1)=md.vx_obs(grids);
    6261md.dirichletvalues_diag(grids,2)=md.vy_obs(grids);
     62
     63
     64%make sure any grid with NaN velocity is spc'd:
     65pos=find(isnan(md.vel_obs_raw));
     66md.gridondirichlet_diag(pos)=1;
     67%we spc to the smoothed value, so that control methods don't go berserk trying to figure out what reaction force to apply for the spc to stand.
     68md.dirichletvalues_diag(pos,1)=md.vx_obs(pos);
     69md.dirichletvalues_diag(pos,2)=md.vy_obs(pos);
     70
     71%make sure icefronts that are completely spc'd are taken out:
     72free_segments=find(sum(md.gridondirichlet_diag(md.segmentonneumann_diag(:,1:2)),2)~=2);
     73md.segmentonneumann_diag=md.segmentonneumann_diag(free_segments,:);
Note: See TracChangeset for help on using the changeset viewer.