You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IconGrid is missing some connectivities (that are present in the simple_grid). For example 7696d1a introduced the offset provider for C2CECEC, but we do not construct the respective connectivity.
The text was updated successfully, but these errors were encountered:
@tehrengruber Here is my implementation for E2C2E/E2C2EO it might be of use to you.
defcompute_e2c2eO(
c2e, e2c,
with_origin=True):
"""Generate the `E2C2E0` map based on the `C2E` and `E2C`. The operation is relatively costly, since it has to be done in Python. By default the origin edge is included, however, by setting `with_origin` to `False` the function will generate `E2C2E`. """# You are not supposed to understand thisdummy_c2e=np.append(c2e, -np.ones_like(c2e), axis=1)
T=dummy_c2e[e2c, :]
Ts=T.shapeS=T.reshape(Ts[0], Ts[1] *Ts[2])
# Now we get all the unique indexesu= []
highestCount=-1foriinrange(S.shape[0]):
s=S[i]
s=s[s>=0] # Remove the invalid indexes.if(with_origin): # Add the origin edge ID if requested.s=list(s) + [i]
else: # or if not, ensure that the ID is not present.s=s[s!=i]
#u.append(np.unique(s)) # Add the unique indexes.highestCount=max(highestCount, u[-1].size)
## Now combine all indexes inside a single array index._e2c2eO=np.full((len(u), highestCount), -1, dtype=c2e.dtype)
fori, sinenumerate(u):
_e2c2eO[i, 0:len(s)] =s#return_e2c2eO# end def: compute_e2c2eO
The
IconGrid
is missing some connectivities (that are present in thesimple_grid
). For example 7696d1a introduced the offset provider forC2CECEC
, but we do not construct the respective connectivity.The text was updated successfully, but these errors were encountered: