Changeset 23231 for issm/trunk-jpl/src/m
- Timestamp:
- 09/08/18 13:03:10 (7 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/modules/Chaco.py
r23095 r23231 5 5 6 6 Usage: 7 [assgn]= Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);7 assgn = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal); 8 8 9 9 A: Input adjacency matrix -
issm/trunk-jpl/src/m/modules/Scotch.py
r23095 r23231 2 2 3 3 def Scotch(*varargin): 4 '''SCOTCH - Scotch partitioner4 '''SCOTCH - Scotch partitioner 5 5 6 6 Usage: -
issm/trunk-jpl/src/m/partition/partitioner.py
r23095 r23231 3 3 import MatlabFuncs as m 4 4 from adjacency import * 5 #from Chaco import *5 from Chaco import * 6 6 #from Scotch import * 7 #from MeshPartition import *7 from MeshPartition import * 8 8 from project3d import * 9 from mesh2d import * 9 10 10 11 def partitioner(md,*varargin): … … 60 61 61 62 if m.strcmpi(package,'chaco'): 62 raise RuntimeError('Chaco is not currently supported for this function')63 #raise RuntimeError('Chaco is not currently supported for this function') 63 64 64 65 # default method (from chaco.m) 65 #method=np.array([1,1,0,0,1,1,50,0,.001,7654321]).reshape(-1,1)66 #method[0]=3 # global method (3=inertial (geometric))67 #method[2]=0 # vertex weights (0=off, 1=on)66 method=np.array([1,1,0,0,1,1,50,0,.001,7654321]) 67 method[0]=3 # global method (3=inertial (geometric)) 68 method[2]=0 # vertex weights (0=off, 1=on) 68 69 69 70 #specify bisection 70 #method[5]=options.getfieldvalue('section')# ndims (1=bisection, 2=quadrisection, 3=octasection)71 method[5]=options.getfieldvalue('section')# ndims (1=bisection, 2=quadrisection, 3=octasection) 71 72 72 73 #are we using weights? 73 #if m.strcmpi(options.getfieldvalue('weighting'),'on'):74 #weights=np.floor(md.qmu.vertex_weight/min(md.qmu.vertex_weight))75 #method[2]=176 #else:77 #weights=[]74 if m.strcmpi(options.getfieldvalue('weighting'),'on'): 75 weights=np.floor(md.qmu.vertex_weight/min(md.qmu.vertex_weight)) 76 method[2]=1 77 else: 78 weights=[] 78 79 80 method = method.reshape(-1,1) # transpose to 1x10 instead of 10 81 79 82 # partition into nparts 80 #if isinstance(md.mesh,mesh2d): 81 #part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y,np.zeros((md.mesh.numberofvertices,)),method,npart,[]).T+1 #index partitions from 1 up. like metis. 82 #else: 83 #part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y,md.mesh.z,method,npart,[]).T+1 #index partitions from 1 up. like metis. 84 83 if isinstance(md.mesh,mesh2d): 84 part=np.array(Chaco(md.qmu.adjacency,weights,np.array([]),md.mesh.x, md.mesh.y,np.zeros((md.mesh.numberofvertices,)),method,npart,np.array([]))).T+1 #index partitions from 1 up. like metis. 85 else: 86 part=np.array(Chaco(md.qmu.adjacency,weights,np.array([]),md.mesh.x, md.mesh.y,md.mesh.z,method,npart,np.array([]))).T+1 #index partitions from 1 up. like metis. 85 87 86 88 elif m.strcmpi(package,'scotch'): -
issm/trunk-jpl/src/m/qmu/dakota_in_write.py
r23095 r23231 62 62 filei2=fullfile(pathstr,name+ext) 63 63 64 print 'Opening Dakota input file \''+filei2 + '\' '64 print 'Opening Dakota input file \''+filei2 + '\'.' 65 65 try: 66 66 with open(filei2,'w+') as fidi: -
issm/trunk-jpl/src/m/qmu/dakota_out_parse.py
r23095 r23231 241 241 dmax95 =prctile_issm(data,95,0) 242 242 243 # Note: the following line may cause the following warning 244 # (should not crash or invalidate results) when one of 245 # the inputs does not change with respect to the 246 # other/s causing an internal divide-by-zero error 247 248 #/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py:3163: 249 # RuntimeWarning: invalid value encountered in true_divide 250 # c /= stddev[:,None] 251 252 # (and/or the same but with "c /= stddev[None, :]") 253 243 254 dcorrel=np.corrcoef(data.T) 244 255 -
issm/trunk-jpl/src/m/qmu/process_qmu_response_data.m
r23095 r23231 43 43 %ok, process the domains named in qmu_mass_flux_profiles, to build a list of segments (MatArray) 44 44 md.qmu.mass_flux_segments=cell(num_mass_flux,1); 45 md.qmu.mass_flux_segments46 45 for i=1:num_mass_flux, 47 46 md.qmu.mass_flux_segments{i}=MeshProfileIntersection(md.mesh.elements,md.mesh.x,md.mesh.y,[md.qmu.mass_flux_profile_directory '/' md.qmu.mass_flux_profiles{i}]); 48 47 end 49 md.qmu.mass_flux_segments50 48 end
Note:
See TracChangeset
for help on using the changeset viewer.