/[escript]/trunk/downunder/py_src/domainbuilder.py
ViewVC logotype

Diff of /trunk/downunder/py_src/domainbuilder.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5289 by sshaw, Tue Dec 2 23:18:40 2014 UTC revision 5290 by sshaw, Wed Dec 3 01:15:33 2014 UTC
# Line 29  import logging Line 29  import logging
29  import numpy as np  import numpy as np
30  from esys.escript.util import *  from esys.escript.util import *
31  from esys.escript import unitsSI as U  from esys.escript import unitsSI as U
32  from .datasources import DataSource, HAS_RIPLEY  from .datasources import DataSource
33  from .coordinates import ReferenceSystem, CartesianReferenceSystem  from .coordinates import ReferenceSystem, CartesianReferenceSystem
34    
35    try:
36        from esys.ripley import Rectangle, Brick
37    except ImportError:
38        raise ImportError("Ripley module not available")
39    
40  class DomainBuilder(object):  class DomainBuilder(object):
41      """      """
42      This class is responsible for constructing an escript Domain object with      This class is responsible for constructing an escript Domain object with
# Line 57  class DomainBuilder(object): Line 62  class DomainBuilder(object):
62                                   Cartesian coordinate system is used.                                   Cartesian coordinate system is used.
63          :type reference_system: `ReferenceSystem`          :type reference_system: `ReferenceSystem`
64          """          """
         if not HAS_RIPLEY:  
             raise RuntimeError("Ripley module not available")  
           
65          self.logger = logging.getLogger('inv.%s'%self.__class__.__name__)          self.logger = logging.getLogger('inv.%s'%self.__class__.__name__)
66          if dim not in (2,3):          if dim not in (2,3):
67              raise ValueError("Number of dimensions must be 2 or 3")              raise ValueError("Number of dimensions must be 2 or 3")

Legend:
Removed from v.5289  
changed lines
  Added in v.5290

  ViewVC Help
Powered by ViewVC 1.1.26