texceptions.py - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
 (HTM) git clone git://src.adamsgaard.dk/pism
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       texceptions.py (824B)
       ---
            1 ############################################################################
            2 #
            3 #  This file is a part of siple.
            4 #
            5 #  Copyright 2010 David Maxwell
            6 #
            7 #  siple is free software: you can redistribute it and/or modify
            8 #  it under the terms of the GNU General Public License as published by
            9 #  the Free Software Foundation, either version 2 of the License, or
           10 #  (at your option) any later version.
           11 # 
           12 ############################################################################
           13 
           14 class NumericalFailure(Exception):
           15   """
           16   Class for exceptoions indicating a failure of a numerical method.
           17   """
           18   pass
           19   
           20 class IterationCountFailure(NumericalFailure):
           21   """
           22   A standard error: an interation count was exceeded.
           23   """
           24   def __init__(self,ITER_MAX):
           25     NumericalFailure.__init__(self,'Iteration count %d exceeded' % ITER_MAX)
           26