Changeset 17782


Ignore:
Timestamp:
04/20/14 09:20:23 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: simplifying solve options

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

Legend:

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

    r17381 r17782  
    99%solution_type: check on this option, error out otherwise
    1010solution_type=getfieldvalue(options,'solution_type');
    11 if ~ismember(solution_type,[StressbalanceSolutionEnum(),MasstransportSolutionEnum(),ThermalSolutionEnum(),...
    12                 SteadystateSolutionEnum(),TransientSolutionEnum(),...
    13                 BalancethicknessSolutionEnum(),BalancethicknessSoftSolutionEnum(),...
    14                 BalancevelocitySolutionEnum(),BedSlopeSolutionEnum(),...
    15                 SurfaceSlopeSolutionEnum(),HydrologySolutionEnum(),FlaimSolutionEnum(),GiaSolutionEnum(),DamageEvolutionSolutionEnum()]),
    16         error(['process_solve_options error message: solution_type ' EnumToString(solution_type) ' not supported yet!']);
     11if ~strncmp(fliplr(EnumToString(solution_type)),fliplr('Solution'),9),
     12        error(['solution_type ' EnumToString(solution_type) ' not supported!']);
    1713end
    1814outoptions.solution_type=solution_type;
    19 
    2015outoptions.runtimename=getfieldvalue(options,'runtimename',true);
    21 outoptions.upload=getfieldvalue(options,'upload','off');
    2216outoptions.batch=getfieldvalue(options,'batch','no');
    2317outoptions.loadonly=getfieldvalue(options,'loadonly',false);
    24 outoptions.directory=getfieldvalue(options,'directory','');
    2518
    2619%  process qmu arguments
  • issm/trunk-jpl/src/m/solve/process_solve_options.py

    r17392 r17782  
    1818        #solution_type: check on this option, error out otherwise
    1919        solution_type=options.getfieldvalue('solution_type')
    20         if solution_type not in (StressbalanceSolutionEnum(),MasstransportSolutionEnum(),ThermalSolutionEnum(),\
    21                         SteadystateSolutionEnum(),TransientSolutionEnum(),\
    22                         BalancethicknessSolutionEnum(),BalancevelocitySolutionEnum(),\
    23                         BedSlopeSolutionEnum(),SurfaceSlopeSolutionEnum(),\
    24                         HydrologySolutionEnum(),FlaimSolutionEnum(),GiaSolutionEnum(),DamageEvolutionSolutionEnum()):
    25                 raise ValueError("process_solve_options error message: solution_type '%s' not supported yet!" % EnumToString(solution_type)[0])
     20        if EnumToString(solution_type)[0][-8:] != 'Solution':
     21                raise ValueError("solution_type '%s' not supported!" % EnumToString(solution_type)[0])
    2622        outoptions['solution_type']=solution_type
    27 
    28         outoptions['upload']=options.getfieldvalue('upload','off')
    2923        outoptions['batch']=options.getfieldvalue('batch','no')
    3024        outoptions['loadonly']=options.getfieldvalue('loadonly',False)
    31         outoptions['directory']=options.getfieldvalue('directory','')
    3225
    3326        #  process qmu arguments
  • issm/trunk-jpl/src/m/solve/solve.m

    r17381 r17782  
    103103LaunchQueueJob(cluster,md.miscellaneous.name,md.private.runtimename,filelist);
    104104
    105 %did we even try to run? if so, wait on lock
    106 if strcmpi(options.upload,'on'),
    107         if md.verbose.solution,
    108                 disp('solve done uploading test decks');
    109         end
    110         return;
    111 end
    112 
    113105%wait on lock
    114106if isnan(md.settings.waitonlock),
  • issm/trunk-jpl/src/m/solve/solve.py

    r17480 r17782  
    9696        cluster.LaunchQueueJob(md.miscellaneous.name,md.private.runtimename,filelist)
    9797
    98         #did we even try to run? if so, wait on lock
    99         if m.strcmpi(options['upload'],'on'):
    100                 print 'solve done uploading test decks'
    101                 return md
    102 
    10398        #wait on lock
    10499        if md.settings.waitonlock>0:
Note: See TracChangeset for help on using the changeset viewer.