Lines Matching refs:perm

7   PetscInt *perm, *iperm;  in DMPlexCreateOrderingClosure_Static()  local
13 PetscCall(PetscMalloc1(pEnd - pStart, &perm)); in DMPlexCreateOrderingClosure_Static()
25 perm[p] = pperm[p]; in DMPlexCreateOrderingClosure_Static()
28 point = perm[p]; in DMPlexCreateOrderingClosure_Static()
36 perm[fMax] = oldc; in DMPlexCreateOrderingClosure_Static()
43 *clperm = perm; in DMPlexCreateOrderingClosure_Static()
69 PetscErrorCode DMPlexGetOrdering(DM dm, MatOrderingType otype, DMLabel label, IS *perm) in DMPlexGetOrdering() argument
76 PetscAssertPointer(perm, 4); in DMPlexGetOrdering()
132 …reateGeneral(PetscObjectComm((PetscObject)dm), pEnd - pStart, invclperm, PETSC_OWN_POINTER, perm)); in DMPlexGetOrdering()
151 PetscErrorCode DMPlexGetOrdering1D(DM dm, IS *perm) in DMPlexGetOrdering1D() argument
194 …ISCreateGeneral(PetscObjectComm((PetscObject)dm), pEnd - pStart, points, PETSC_OWN_POINTER, perm)); in DMPlexGetOrdering1D()
198 static PetscErrorCode DMPlexRemapCoordinates_Private(IS perm, PetscSection cs, Vec coordinates, Pet… in DMPlexRemapCoordinates_Private() argument
206 PetscCall(PetscSectionPermute(cs, perm, csNew)); in DMPlexRemapCoordinates_Private()
213 PetscCall(ISGetIndices(perm, &pperm)); in DMPlexRemapCoordinates_Private()
222 PetscCall(ISRestoreIndices(perm, &pperm)); in DMPlexRemapCoordinates_Private()
244 PetscErrorCode DMPlexPermute(DM dm, IS perm, DM *pdm) in DMPlexPermute() argument
252 PetscValidHeaderSpecific(perm, IS_CLASSID, 2); in DMPlexPermute()
267 PetscCall(PetscSectionPermute(section, perm, &sectionNew)); in DMPlexPermute()
283 PetscCall(DMLabelPermute(label, perm, &labelNew)); in DMPlexPermute()
288 … if (plex->subpointMap) PetscCall(DMLabelPermute(plex->subpointMap, perm, &plexNew->subpointMap)); in DMPlexPermute()
303 PetscCall(PetscSectionPermute(plex->coneSection, perm, &plexNew->coneSection)); in DMPlexPermute()
307 PetscCall(ISGetIndices(perm, &pperm)); in DMPlexPermute()
321 PetscCall(PetscSectionPermute(plex->supportSection, perm, &plexNew->supportSection)); in DMPlexPermute()
333 PetscCall(ISRestoreIndices(perm, &pperm)); in DMPlexPermute()
343 PetscCall(DMPlexRemapCoordinates_Private(perm, cs, coordinates, &csNew, &coordinatesNew)); in DMPlexPermute()
357 PetscCall(DMPlexRemapCoordinates_Private(perm, cs, coordinates, &csNew, &coordinatesNew)); in DMPlexPermute()
435 PetscInt *perm; in DMCreateSectionPermutation_Plex_Reverse() local
440 PetscCall(PetscMalloc1(pEnd - pStart, &perm)); in DMCreateSectionPermutation_Plex_Reverse()
441 for (PetscInt p = pStart; p < pEnd; ++p) perm[pEnd - 1 - p] = p; in DMCreateSectionPermutation_Plex_Reverse()
442 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, pEnd - pStart, perm, PETSC_OWN_POINTER, &permIS)); in DMCreateSectionPermutation_Plex_Reverse()
453 PetscInt *perm; in DMCreateSectionPermutation_Plex_Cohesive_Old() local
458 PetscCall(PetscMalloc1(pEnd - pStart, &perm)); in DMCreateSectionPermutation_Plex_Cohesive_Old()
471 perm[i++] = p; in DMCreateSectionPermutation_Plex_Cohesive_Old()
490 perm[i++] = q; in DMCreateSectionPermutation_Plex_Cohesive_Old()
511 perm[i++] = qsupp[qs]; in DMCreateSectionPermutation_Plex_Cohesive_Old()
523 perm[i++] = qq; in DMCreateSectionPermutation_Plex_Cohesive_Old()
537 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, pEnd - pStart, perm, PETSC_OWN_POINTER, &permIS)); in DMCreateSectionPermutation_Plex_Cohesive_Old()
545 …tCohesiveBlock_Private(DM dm, PetscBT bt, PetscBT blst, PetscInt p, PetscInt *idx, PetscInt perm[]) in InsertCohesiveBlock_Private() argument
556 if (!PetscBTLookupSet(bt, cone[0])) perm[(*idx)++] = cone[0]; in InsertCohesiveBlock_Private()
557 if (!PetscBTLookupSet(bt, cone[1])) perm[(*idx)++] = cone[1]; in InsertCohesiveBlock_Private()
559 …scInt c = 2; c < cS; ++c) PetscCall(InsertCohesiveBlock_Private(dm, bt, NULL, cone[c], idx, perm)); in InsertCohesiveBlock_Private()
561 perm[(*idx)++] = p; in InsertCohesiveBlock_Private()
570 PetscInt *perm; in DMCreateSectionPermutation_Plex_Cohesive() local
576 PetscCall(PetscMalloc1(pEnd - pStart, &perm)); in DMCreateSectionPermutation_Plex_Cohesive()
586 …== DM_POLYTOPE_SEG_PRISM_TENSOR) PetscCall(InsertCohesiveBlock_Private(dm, bt, blst, p, &i, perm)); in DMCreateSectionPermutation_Plex_Cohesive()
589 …= DM_POLYTOPE_QUAD_PRISM_TENSOR) PetscCall(InsertCohesiveBlock_Private(dm, bt, blst, p, &i, perm)); in DMCreateSectionPermutation_Plex_Cohesive()
599 perm[i++] = p; in DMCreateSectionPermutation_Plex_Cohesive()
606 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, pEnd - pStart, perm, PETSC_OWN_POINTER, &permIS)); in DMCreateSectionPermutation_Plex_Cohesive()
613 PetscErrorCode DMCreateSectionPermutation_Plex(DM dm, IS *perm, PetscBT *blockStarts) in DMCreateSectionPermutation_Plex() argument
627 if (iscohesive) PetscCall(DMCreateSectionPermutation_Plex_Cohesive(dm, perm, blockStarts)); in DMCreateSectionPermutation_Plex()
628 …else if (iscohesiveOld) PetscCall(DMCreateSectionPermutation_Plex_Cohesive_Old(dm, perm, blockStar… in DMCreateSectionPermutation_Plex()
629 else if (isreverse) PetscCall(DMCreateSectionPermutation_Plex_Reverse(dm, perm, blockStarts)); in DMCreateSectionPermutation_Plex()