Changeset 12960


Ignore:
Timestamp:
08/09/12 16:32:52 (13 years ago)
Author:
schlegel
Message:

CHG: check that mesh.z is within bed and surface

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

Legend:

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

    r12943 r12960  
    8787                        md = checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]);
    8888                        md = checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]);
     89                        if (md.mesh.dimension==3),
     90                                md = checkfield(md,'mesh.z','>=',md.geometry.bed,'message','''mesh.z'' should be above the bed');
     91                                md = checkfield(md,'mesh.z','<=',md.geometry.surface,'message','''mesh.z'' should be below the ice surface');
     92                        end
    8993                        if (md.mesh.dimension==2),
    9094                                md = checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d');
  • TabularUnified issm/trunk-jpl/src/m/utils/consistency/checkfield.m

    r12842 r12960  
    136136        if any(field2<lowerbound),
    137137                md = checkmessage(md,getfieldvalue(options,'message',...
    138                         ['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
     138                        ['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))]));
    139139        end
    140140end
     
    144144        if any(field2<=lowerbound),
    145145                md = checkmessage(md,getfieldvalue(options,'message',...
    146                         ['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
     146                        ['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))]));
    147147        end
    148148end
     
    154154        if any(field2>upperbound),
    155155                md = checkmessage(md,getfieldvalue(options,'message',...
    156                         ['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
     156                        ['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))]));
    157157        end
    158158end
     
    162162        if any(field2>=upperbound),
    163163                md = checkmessage(md,getfieldvalue(options,'message',...
    164                         ['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
     164                        ['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))]));
    165165        end
    166166end
Note: See TracChangeset for help on using the changeset viewer.