- Timestamp:
- 10/24/19 18:24:07 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/dynamico/meshes.py
r977 r984 662 662 663 663 # compute_ne(...) and normalize(...) expect indices starting at 1 664 for ind in (trisk, primal_vertex, dual_vertex, primal_edge, dual_edge, left, right, down, up) : ind+=1 664 for ind in (trisk, primal_vertex, dual_vertex, primal_edge, dual_edge) : ind+=1 665 left, right, down, up = left+1, right+1, down+1, up+1 # these ones are subarrays, we need deep copies 665 666 666 667 # read from mesh file : coordinates, lengths and areas in reference domain … … 757 758 perm[old]=new 758 759 return perm # maps old indices to new indices 759 760 def toint(x): return np.int32((x+1.)*65536)761 762 def morton_index(x,y,z):763 nn, xx, yy, zz = x.size, toint(x), toint(y), toint(z)764 idx=np.zeros(nn, dtype=np.int64)765 partition.dynamico_morton_encode(nn, xx,yy,zz, idx)766 return idx767 760 768 761 #-------------------------------------- Mesh partitioning ------------------------------------------#
Note: See TracChangeset
for help on using the changeset viewer.