Changeset 17488


Ignore:
Timestamp:
03/19/14 22:14:22 (11 years ago)
Author:
cborstad
Message:

BUG: missed a few changes after updating the import of MatlabFuncs

Location:
issm/trunk-jpl/src/m
Files:
5 edited

Legend:

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

    r17435 r17488  
    4242from private import private
    4343from EnumDefinitions import *
    44 from mumpsoptions import *
    45 from iluasmoptions import *
    46 from project3d import *
    47 from FlagElements import *
    48 from NodeConnectivity import *
    49 from ElementConnectivity import *
    50 from contourenvelope import *
    51 from PythonFuncs import *
     44from mumpsoptions import mumpsoptions
     45from iluasmoptions import iluasmoptions
     46from project3d import project3d
     47from FlagElements import FlagElements
     48from NodeConnectivity import NodeConnectivity
     49from ElementConnectivity import ElementConnectivity
     50from contourenvelope import contourenvelope
     51import MatlabFuncs as m
    5252#}}}
    5353
     
    257257                        field=getattr(md1,fieldi)
    258258                        fieldsize=numpy.shape(field)
    259                         if hasattr(field,'__dict__') and not ismember(fieldi,['results'])[0]:    #recursive call
     259                        if hasattr(field,'__dict__') and not m.ismember(fieldi,['results'])[0]:    #recursive call
    260260                                object_fields=vars(field)
    261261                                for fieldj in object_fields:
  • issm/trunk-jpl/src/m/exp/expread.py

    r17480 r17488  
    4848                        break
    4949                A=A.split(None,1)
    50                 if not (len(A) == 2 and m.strcmp(A[0],'##') and strncmp(A[1],'Name:',5)):
     50                if not (len(A) == 2 and m.strcmp(A[0],'##') and m.strncmp(A[1],'Name:',5)):
    5151                        break
    5252                if len(A[1])>5:
     
    5757                #Get Icon
    5858                A=fid.readline().split(None,1)
    59                 if not (len(A) == 2 and m.strcmp(A[0],'##') and strncmp(A[1],'Icon:',5)):
     59                if not (len(A) == 2 and m.strcmp(A[0],'##') and m.strncmp(A[1],'Icon:',5)):
    6060                        break
    6161
  • issm/trunk-jpl/src/m/mesh/ComputeHessian.py

    r17480 r17488  
    3838
    3939        #compute weights that hold the volume of all the element holding the node i
    40         weights=sparse(line,numpy.ones((linesize,1)),numpy.tile(areas.reshape(-1,1),(3,1)),numberofnodes,1)
     40        weights=m.sparse(line,numpy.ones((linesize,1)),numpy.tile(areas.reshape(-1,1),(3,1)),numberofnodes,1)
    4141
    4242        #compute field on nodes if on elements
    4343        if numpy.size(field,axis=0)==numberofelements:
    44                 field=sparse(line,numpy.ones((linesize,1)),numpy.tile(areas*field,(3,1)),numberofnodes,1)/weights
     44                field=m.sparse(line,numpy.ones((linesize,1)),numpy.tile(areas*field,(3,1)),numberofnodes,1)/weights
    4545
    4646        #Compute gradient for each element
     
    4949
    5050        #Compute gradient for each node (average of the elements around)
    51         gradx=sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*grad_elx).reshape(-1,1),(3,1)),numberofnodes,1)
    52         grady=sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*grad_ely).reshape(-1,1),(3,1)),numberofnodes,1)
     51        gradx=m.sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*grad_elx).reshape(-1,1),(3,1)),numberofnodes,1)
     52        grady=m.sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*grad_ely).reshape(-1,1),(3,1)),numberofnodes,1)
    5353        gradx=gradx/weights
    5454        grady=grady/weights
     
    5959        if m.strcmpi(type,'node'):
    6060                #Compute Hessian on the nodes (average of the elements around)
    61                 hessian=numpy.hstack((sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*hessian[:,0]).reshape(-1,1),(3,1)),numberofnodes,1)/weights, \
    62                         sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*hessian[:,1]).reshape(-1,1),(3,1)),numberofnodes,1)/weights, \
    63                         sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*hessian[:,2]).reshape(-1,1),(3,1)),numberofnodes,1)/weights ))
     61                hessian=numpy.hstack((m.sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*hessian[:,0]).reshape(-1,1),(3,1)),numberofnodes,1)/weights, \
     62                        m.sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*hessian[:,1]).reshape(-1,1),(3,1)),numberofnodes,1)/weights, \
     63                        m.sparse(line,numpy.ones((linesize,1)),numpy.tile((areas*hessian[:,2]).reshape(-1,1),(3,1)),numberofnodes,1)/weights ))
    6464
    6565        return hessian
  • issm/trunk-jpl/src/m/parameterization/contourenvelope.py

    r15987 r17488  
    22import numpy
    33import copy
    4 from NodeConnectivity import *
    5 from ElementConnectivity import *
     4from NodeConnectivity import NodeConnectivity
     5from ElementConnectivity import ElementConnectivity
    66from mesh import *
     7import MatlabFuncs as m
    78
    89def contourenvelope(md,*args):
     
    6768                        elemout=numpy.nonzero(numpy.logical_not(elemin))[0]
    6869                        mesh.elementconnectivity[elemout,:]=0
    69                         mesh.elementconnectivity[numpy.nonzero(ismember(mesh.elementconnectivity,elemout+1))]=0
     70                        mesh.elementconnectivity[numpy.nonzero(m.ismember(mesh.elementconnectivity,elemout+1))]=0
    7071                else:
    7172                        #get flag list of elements and nodes inside the contour
     
    8081                        elemout=numpy.nonzero(numpy.logical_not(elemin))[0]
    8182                        mesh.elementconnectivity[elemout,:]=0
    82                         mesh.elementconnectivity[numpy.nonzero(ismember(mesh.elementconnectivity,elemout+1))]=0
     83                        mesh.elementconnectivity[numpy.nonzero(m.ismember(mesh.elementconnectivity,elemout+1))]=0
    8384
    8485        #Find element on boundary
     
    118119                        for j in xrange(0,3):
    119120                                nods=numpy.delete(nods1,j)
    120                                 if numpy.any(ismember(flag,nods)):
     121                                if numpy.any(m.ismember(flag,nods)):
    121122                                        segments[count,:]=[nods[0],nods[1],el1+1]
    122123                                        ord1=numpy.nonzero(nods[0]==mesh.elements[el1,:])[0][0]
  • issm/trunk-jpl/src/m/parameterization/setmask.py

    r17432 r17488  
    22import os
    33from model import *
    4 from FlagElements import *
     4from FlagElements import FlagElements
     5import pairoptions
    56
    67def setmask(md, floatingicename, groundedicename, *args):
     
    2829
    2930        #process options
    30         options=pairoptions(*args)
     31        options=pairoptions.pairoptions(*args)
    3132
    3233        #Get assigned fields
Note: See TracChangeset for help on using the changeset viewer.