Ignore:
Timestamp:
03/19/14 18:29:13 (11 years ago)
Author:
cborstad
Message:

CHG: cleaning up python imports. Use "m" prefix when using MatlabFuncs so that users can track down where these functions are defined rather than assuming they are mysterious python built-ins. Avoid importing * when possible, which cleans up the namespace and makes sure each module imports only what it needs (and that modules are not using functions imported by another module, which can break the code if modules are moved around)

File:
1 edited

Legend:

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

    r17401 r17480  
    22from EnumDefinitions import *
    33from StringToEnum import StringToEnum
    4 from checkfield import *
    5 from WriteData import *
     4from checkfield import checkfield
     5from WriteData import WriteData
     6import MatlabFuncs as m
    67
    78class damage(object):
     
    109110        def defaultoutputs(self,md): # {{{
    110111
    111                 if strcmp(md.mesh.meshtype(),'3D'):
     112                if m.strcmp(md.mesh.meshtype(),'3D'):
    112113                        list = ['DamageD']
    113                 elif strcmp(md.mesh.meshtype(),'2Dhorizontal'):
     114                elif m.strcmp(md.mesh.meshtype(),'2Dhorizontal'):
    114115                        list = ['DamageD']
    115                 elif strcmp(md.mesh.meshtype(),'2Dvertical'):
     116                elif m.strcmp(md.mesh.meshtype(),'2Dvertical'):
    116117                        list = ['DamageD']
    117118                else:
     
    143144                        md = checkfield(md,'fieldname','damage.equiv_stress','numel',[1],'values',[0,1])
    144145                        md = checkfield(md,'fieldname','damage.requested_outputs','stringrow',1)
    145                 elif strcmpi(self.law,'undamaged'):
     146                elif m.strcmpi(self.law,'undamaged'):
    146147                        if (solution==DamageEvolutionSolutionEnum):
    147148                                raise RuntimeError('Invalid evolution law (md.damage.law) for a damage solution')
Note: See TracChangeset for help on using the changeset viewer.