Ignore:
Timestamp:
07/19/12 15:32:17 (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/classes/rifts.m

    r11924 r12663  
    2121
    2222                end % }}}
    23                 function checkconsistency(obj,md,solution,analyses) % {{{
     23                function md = checkconsistency(obj,md,solution,analyses) % {{{
    2424                        if isempty(obj.riftstruct) | isnans(obj.riftstruct),
    2525                                numrifts=0;
     
    2929                        if numrifts,
    3030                                if ~(md.mesh.dimension==2),
    31                                         checkmessage(['models with rifts are only supported in 2d for now!']);
     31                                        md = checkmessage(md,['models with rifts are only supported in 2d for now!']);
    3232                                end
    3333                                if ~isstruct(obj.riftstruct),
    34                                         checkmessage(['rifts.riftstruct should be a structure!']);
     34                                        md = checkmessage(md,['rifts.riftstruct should be a structure!']);
    3535                                end
    3636                                if ~isempty(find(md.mesh.segmentmarkers>=2)),
    3737                                        %We have segments with rift markers, but no rift structure!
    38                                         checkmessage(['model should be processed for rifts (run meshprocessrifts)!']);
     38                                        md = checkmessage(md,['model should be processed for rifts (run meshprocessrifts)!']);
    3939                                end
    40                                 checkfield(md,'rifts.riftstruct.fill','values',[WaterEnum() AirEnum() IceEnum() MelangeEnum()]);
     40                                md = checkfield(md,'rifts.riftstruct.fill','values',[WaterEnum() AirEnum() IceEnum() MelangeEnum()]);
    4141                        else
    4242                                if ~isnans(obj.riftstruct),
    43                                         checkmessage(['riftstruct shoud be NaN since numrifts is 0!']);
     43                                        md = checkmessage(md,['riftstruct shoud be NaN since numrifts is 0!']);
    4444                                end
    4545                        end
Note: See TracChangeset for help on using the changeset viewer.