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

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

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

revision 5287 by jduplessis, Thu Oct 23 00:37:38 2014 UTC revision 5288 by sshaw, Tue Dec 2 23:18:40 2014 UTC
# Line 16  Line 16 
16  from esys.escript import getMPIWorldMax, getMPIRankWorld  from esys.escript import getMPIWorldMax, getMPIRankWorld
17  from esys.escript import *  from esys.escript import *
18  from esys.escript.linearPDEs import LinearPDE, SolverOptions  from esys.escript.linearPDEs import LinearPDE, SolverOptions
 from esys.finley import ReadGmsh, ReadMesh  
19  from esys.weipa import saveSilo  from esys.weipa import saveSilo
20  from math import pi  from math import pi
21  import esys.escript.pdetools           as pdetools  import esys.escript.pdetools           as pdetools
# Line 27  import os Line 26  import os
26  import logging  import logging
27  logger=logging.getLogger('inv.DCResDomGenerator')  logger=logging.getLogger('inv.DCResDomGenerator')
28    
29    HAS_FINLEY = True
30    try:
31        from esys.finley import ReadGmsh, ReadMesh
32    except ImportError as e:
33        HAS_FINLEY = False
34    
35  class DCResDomGenerator(object):  class DCResDomGenerator(object):
36      """      """
# Line 46  class DCResDomGenerator(object): Line 50  class DCResDomGenerator(object):
50          :type [(x,y,z)_start,(x,y,z)_extent]          :type [(x,y,z)_start,(x,y,z)_extent]
51          :          :
52          """          """
53            if not HAS_FINLEY:
54                raise RuntimeError("Finley module not available")
55          if(len(extents)==3 or len(extents)==4):          if(len(extents)==3 or len(extents)==4):
56              self.__extents=extents              self.__extents=extents
57          else:          else:

Legend:
Removed from v.5287  
changed lines
  Added in v.5288

  ViewVC Help
Powered by ViewVC 1.1.26