Changeset 18101


Ignore:
Timestamp:
06/04/14 06:20:34 (11 years ago)
Author:
glperez
Message:

CHG: introduced option to bypass on consistency check.

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

Legend:

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

    r17794 r18101  
    2121%      - loadonly    : does not solve. only load results
    2222%      - runtimename : true or false (default is true), makes name unique
     23%      - checkconsistency : 'yes' or 'no' (default is 'yes'), ensures checks on consistency of model
    2324%
    2425%   Examples:
     
    3637
    3738%check model consistency
    38 if md.verbose.solution,
    39         disp('checking model consistency');
    40 end
    41 if (solutionenum == FlaimSolutionEnum())
    42         md.private.isconsistent=true;
    43         md=checkconsistency(md.mesh,md,solutionenum);
    44         md=checkconsistency(md.flaim,md,solutionenum);
    45         if md.private.isconsistent==false,
    46                 error('Model not consistent, see messages above');
     39if strcmpi(getfieldvalue(options,'checkconsistency','yes'),'no'),
     40        if md.verbose.solution,
     41                disp('checking model consistency');
    4742        end
    48 else
    49         ismodelselfconsistent(md),
     43        if (solutionenum == FlaimSolutionEnum())
     44                md.private.isconsistent=true;
     45                md=checkconsistency(md.mesh,md,solutionenum);
     46                md=checkconsistency(md.flaim,md,solutionenum);
     47                if md.private.isconsistent==false,
     48                        error('Model not consistent, see messages above');
     49                end
     50        else
     51                ismodelselfconsistent(md),
     52        end
    5053end
    5154
  • issm/trunk-jpl/src/m/solve/solve.py

    r17798 r18101  
    3333           extra options:
    3434              - loadonly : does not solve. only load results
     35                  - checkconsistency : 'yes' or 'no' (default is 'yes'), ensures checks on consistency of model
    3536 
    3637           Examples:
     
    4849
    4950        #check model consistency
    50         print "checking model consistency"
    51         if solutionenum == FlaimSolutionEnum():
    52                 md.private.isconsistent=True
    53                 md.mesh.checkconsistency(md,solutionenum)
    54                 md.flaim.checkconsistency(md,solutionenum)
    55                 if not md.private.isconsistent:
    56                         raise RuntimeError("Model not consistent, see messages above.")
    57         else:
    58                 ismodelselfconsistent(md)
     51        if m.strcmpi(options.getfieldvalue('checkconsistency','yes'),'no'):
     52                print "checking model consistency"
     53                if solutionenum == FlaimSolutionEnum():
     54                        md.private.isconsistent=True
     55                        md.mesh.checkconsistency(md,solutionenum)
     56                        md.flaim.checkconsistency(md,solutionenum)
     57                        if not md.private.isconsistent:
     58                                raise RuntimeError("Model not consistent, see messages above.")
     59                else:
     60                        ismodelselfconsistent(md)
    5961
    6062        #First, build a runtime name that is unique
Note: See TracChangeset for help on using the changeset viewer.