Changeset 12664


Ignore:
Timestamp:
07/19/12 15:32:55 (13 years ago)
Author:
Mathieu Morlighem
Message:

ismodelselfconsistant now uses a model field instead of a persistent variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/model/ismodelselfconsistent.m

    r11224 r12664  
    66
    77%initialize consistency as true
    8 modelconsistency(true);
     8md.private.isconsistent=true;
    99
    1010%Get solution and associated analyses
     
    2424        %Check that current field is an object
    2525        if ~isobject(md.(field))
    26                 checkmessage(['field ''' char(field) ''' is not an object']);
     26                md=checkmessage(md,['field ''' char(field) ''' is not an object']);
    2727        end
    2828
    2929        %Check consistency of the object
    3030        if verLessThan('matlab', '7.6')
    31                 checkconsistency(md.(field),md,solution,analyses);
     31                md=checkconsistency(md.(field),md,solution,analyses);
    3232        else
    33                 md.(field).checkconsistency(md,solution,analyses);
     33                md=md.(field).checkconsistency(md,solution,analyses);
    3434        end
    3535end
    3636
    3737%error message if mode is not consistent
    38 if modelconsistency==false,
    39         error(' ');
     38if md.private.isconsistent==false,
     39        error('Model not consistent, see messages above');
    4040end
Note: See TracChangeset for help on using the changeset viewer.