Changeset 13455
- Timestamp:
- 09/26/12 17:02:08 (12 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 14 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py ¶
r13076 r13455 1 1 import os 2 2 import numpy 3 from ContourToMesh import ContourToMesh 3 4 4 5 def SetIceShelfBC(md,icefrontfile=''): … … 24 25 if not os.path.exists(icefrontfile): 25 26 raise IOError("SetIceShelfBC error message: ice front file '%s' not found." % icefrontfile) 26 nodeinsideicefront=ContourToMesh( md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2)27 nodeonicefront= double(md.mesh.vertexonboundary and nodeinsideicefront)27 nodeinsideicefront=ContourToMesh((md.mesh.elements).reshape(-1,1),(md.mesh.x).reshape(-1,1),(md.mesh.y).reshape(-1,1),icefrontfile,'node',2) 28 nodeonicefront= numpy.bitwise_and( map(int,md.mesh.vertexonboundary), map(int,nodeinsideicefront[0].ravel()) ) 28 29 else: 29 30 nodeonicefront=numpy.zeros(md.mesh.numberofvertices) -
TabularUnified issm/trunk-jpl/src/m/classes/flowequation.py ¶
r13171 r13455 1 1 #module imports 2 import copy 2 3 import numpy 3 4 from fielddisplay import fielddisplay … … 81 82 82 83 def marshall(self,fid): # {{{ 84 #print "marshalling flowequation-1" 85 #print self.vertex_equation 83 86 WriteData(fid,'object',self,'fieldname','ismacayealpattyn','format','Boolean') 84 87 WriteData(fid,'object',self,'fieldname','ishutter','format','Boolean') … … 89 92 WriteData(fid,'object',self,'fieldname','borderstokes','format','DoubleMat','mattype',1) 90 93 #convert approximations to enums 91 data=self.vertex_equation 94 ## data=list(self.vertex_equation) 95 data=copy.deepcopy(self.vertex_equation) 92 96 data[numpy.nonzero(data==0)]=NoneApproximationEnum() 93 97 data[numpy.nonzero(data==1)]=HutterApproximationEnum() … … 100 104 data[numpy.nonzero(data==8)]=L1L2ApproximationEnum() 101 105 WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1) 102 data=self.element_equation 106 ########data=self.element_equation 107 data=copy.deepcopy(self.element_equation) 103 108 data[numpy.nonzero(data==0)]=NoneApproximationEnum() 104 109 data[numpy.nonzero(data==1)]=HutterApproximationEnum() … … 111 116 data[numpy.nonzero(data==8)]=L1L2ApproximationEnum() 112 117 WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2) 118 #print "marshalling flowequation-4" 119 #print self.vertex_equation 113 120 # }}} 114 121 -
TabularUnified issm/trunk-jpl/src/modules/python/Makefile.am ¶
r13441 r13455 14 14 NodeConnectivity.la\ 15 15 StringToEnum.la\ 16 ContourToMesh.la\ 16 17 TriMesh.la 17 18 endif … … 94 95 StringToEnum_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) 95 96 97 ContourToMesh_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp\ 98 ../ContourToMesh/ContourToMesh.h 99 ContourToMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) 100 96 101 TriMesh_la_SOURCES = ../TriMesh/TriMesh.cpp\ 97 102 ../TriMesh/TriMesh.h
Note:
See TracChangeset
for help on using the changeset viewer.