Changeset 984


Ignore:
Timestamp:
10/24/19 18:24:07 (5 years ago)
Author:
dubos
Message:

devel/Python : bugfix dynamico/meshes.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/Python/dynamico/meshes.py

    r977 r984  
    662662         
    663663        # 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 
    665666 
    666667        # read from mesh file : coordinates, lengths and areas in reference domain 
     
    757758        perm[old]=new 
    758759    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 idx 
    767760 
    768761#-------------------------------------- Mesh partitioning ------------------------------------------# 
Note: See TracChangeset for help on using the changeset viewer.