Changeset 11788


Ignore:
Timestamp:
03/25/12 00:26:14 (13 years ago)
Author:
Eric.Larour
Message:

New pairoptions python class + solver class

Location:
issm/trunk-jpl/src/py/classes
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/py/classes

    • Property svn:ignore set to
      __pycache__
  • issm/trunk-jpl/src/py/classes/solver.py

    r11787 r11788  
    11#module imports
    2 from fielddisplay import fielddisplay
     2import fielddisplay
     3import ismumps
    34
    45class solver:
     
    67        def __init__(self):
    78                # {{{ Properties
    8                 self.options           = [];
     9                if ismumps:
     10                        self.options=['NoneAnalysis',mumpsoptions]
     11                else:
     12                        self.options=['NoneAnalysis',iluasmoptions]
    913                #}}}
    1014        def __repr__(obj):
     
    1216               
    1317                string2="   solver parameters:"
    14                 for i in range(len(obj.options,1)):
     18                for i in range(len(obj.options)):
    1519                        option=obj.options[i]
    1620                        analysis=option[0]
     
    3337                                                string="%s%s%s%s%s"%(string," -",option[0]," ",option[1])
    3438                                        else:
    35                                                 print("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
    36                                                 sys.exit();
     39                                                raise RuntimeError("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
    3740                                else:
    38                                         print("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
    39                                         sys.exit()
     41                                        raise RuntimeError("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
     42
    4043                        string2="%s\n%s"%(string2,"   %s -> '%s'"%(analysis,string))
    4144                return string2
Note: See TracChangeset for help on using the changeset viewer.