Changeset 18649


Ignore:
Timestamp:
10/15/14 14:40:07 (10 years ago)
Author:
seroussi
Message:

NEW: added check consistency of front (not all vertices on the front)

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/mask.m

    r18492 r18649  
    5353                                warning('no ice front provided');
    5454                        end
     55                        icefront=sum(md.mask.ice_levelset(md.mesh.elements)==0,2);
     56                        if (max(icefront)==3 & strcmp(elementtype(md.mesh),'Tria')) | (max(icefront==6) & strcmp(elementtype(md.mesh),'Penta')),
     57                                error('At least one element has all nodes on ice front, change md.mask.ice_levelset to fix it')
     58                        end
    5559                end % }}}
    5660                function disp(obj) % {{{
  • issm/trunk-jpl/src/m/classes/mask.py

    r18068 r18649  
    3838                        raise TypeError("no ice present in the domain")
    3939
     40                icefront=numpy.sum(md.mask.ice_levelset[md.mesh.elements]==0,2)
     41                if (max(icefront)==3 and m.strcmp(md.mesh.elementtype(),'Tria')) or (max(icefront==6) and m.strcmp(md.mesh.elementtype(),'Penta')):
     42                        raise TypeError("At least one element has all nodes on ice front, change md.mask.ice_levelset to fix it")
     43
    4044                return md
    4145        # }}}
Note: See TracChangeset for help on using the changeset viewer.