Lines Matching refs:g2l
267 PetscHMapI g2l = nullptr;
274 PetscCall(PetscHMapICreateWithSize(n1, &g2l));
276 PetscCall(PetscHMapIGetWithDefault(g2l, indices[i], -1, &val)); // if not exist, val is set with -1
277 if (val < 0) PetscCall(PetscHMapISet(g2l, indices[i], tot++)); // val < 0 means gid is not in the hash table yet
281 PetscCall(PetscHMapIGetWithDefault(g2l, garray1[i], -1, &val));
282 if (val < 0) PetscCall(PetscHMapISet(g2l, garray1[i], tot++));
289 PetscHashIterBegin(g2l, iter);
290 while (!PetscHashIterAtEnd(g2l, iter)) {
291 PetscHashIterGetKey(g2l, iter, key);
292 PetscHashIterNext(g2l, iter);
298 PetscCall(PetscHMapIClear(g2l));
299 for (PetscInt i = 0; i < tot; i++) PetscCall(PetscHMapISet(g2l, garray2[i], i)); // i is the local id
303 PetscCall(PetscHMapIGetWithDefault(g2l, indices[i], -1, &val));
308 for (PetscInt i = 0; i < n1; i++) PetscCall(PetscHMapIGetWithDefault(g2l, garray1[i], -1, &map[i]));
309 PetscCall(PetscHMapIDestroy(&g2l));