Changeset 9263


Ignore:
Timestamp:
08/10/11 15:57:52 (14 years ago)
Author:
jschierm
Message:

ismodelselfconsistent.m: Move Flaim check up front and return (per Eric).

File:
1 edited

Legend:

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

    r9221 r9263  
    1616%initialize consistency as true
    1717modelconsistency(true);
     18
     19% Flaim doesn't need the entire model, so take an early return
     20%FLAIM {{{1
     21if (md.solution_type == FlaimSolutionEnum),
     22        if ~exist(md.fm_tracks,'file')
     23                message(['model not consistent: fm_tracks file ''' md.fm_tracks ''' must exist.']);
     24        end
     25        %   probably going to need some checks on fm_flightreqs here
     26        if (numel(md.fm_criterion) ~= md.numberofnodes) && (numel(md.fm_criterion) ~= md.numberofelements)
     27                message(['model not consistent: fm_criterion vector must have number of nodes (' int2str(md.numberofnodes) ') or elements (' int2str(md.numberofelements) ') values, not ' int2str(numel(md.fm_criterion)) ' values.']);
     28        end
     29        return;
     30end
     31%}}}
    1832
    1933% Common checks
     
    333347        if(md.cfl_coefficient>1 | md.cfl_coefficient<0),
    334348                message(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
    335         end
    336 end
    337 %}}}
    338 %FLAIM {{{1
    339 if (md.solution_type == FlaimSolutionEnum),
    340         if ~exist(md.fm_tracks,'file')
    341                 message(['model not consistent: fm_tracks file ''' md.fm_tracks ''' must exist.']);
    342         end
    343         %   probably going to need some checks on fm_flightreqs here
    344         if (numel(md.fm_criterion) ~= md.numberofnodes) && (numel(md.fm_criterion) ~= md.numberofelements)
    345                 message(['model not consistent: fm_criterion vector must have number of nodes (' int2str(md.numberofnodes) ') or elements (' int2str(md.numberofelements) ') values, not ' int2str(numel(md.fm_criterion)) ' values.']);
    346349        end
    347350end
Note: See TracChangeset for help on using the changeset viewer.