Changeset 23440
- Timestamp:
- 10/30/18 17:59:04 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/partition/partitioner.py
r23231 r23440 1 1 import numpy as np 2 import copy 2 3 from pairoptions import * 3 4 import MatlabFuncs as m … … 41 42 recomputeadjacency=options.getfieldvalue('recomputeadjacency') 42 43 43 if( np.ndim(md.mesh)==3):44 if(md.mesh.dimension()==3): 44 45 #partitioning essentially happens in 2D. So partition in 2D, then 45 46 #extrude the partition vector vertically. 46 md3d =md #save for later47 md3d = copy.deepcopy(md) 47 48 md.mesh.elements=md.mesh.elements2d 48 49 md.mesh.x=md.mesh.x2d … … 116 117 117 118 #extrude if we are in 3D: 118 if np.ndim(md.mesh)==3:119 if md.mesh.dimension()==3: 119 120 md3d.qmu.vertex_weight=md.qmu.vertex_weight 120 121 md3d.qmu.adjacency=md.qmu.adjacency 121 122 md=md3d 122 part=project3d(md,'vector', part.T,'type','node')123 part=project3d(md,'vector',np.squeeze(part),'type','node') 123 124 124 125 md.qmu.partition=part
Note:
See TracChangeset
for help on using the changeset viewer.