Lines Matching refs:pblocks
2930 PetscInt *dnz, *onz, *dnzu, *onzu, bsLocal[2], bsMinMax[2], *pblocks; in DMCreateMatrix_Plex() local
2937 PetscCall(PetscCalloc1(localSize, &pblocks)); in DMCreateMatrix_Plex()
2957 for (PetscInt i = 0; i < dof - cdof; ++i) pblocks[offset - localStart + i] = dof - cdof; in DMCreateMatrix_Plex()
2959 … if (bstate == PETSC_BOOL3_FALSE && dof - cdof) pblocks[offset - localStart] = -(dof - cdof); in DMCreateMatrix_Plex()
2981 …for (PetscInt i = 0; i < dof - cdof; i++) pblocks[offset - localStart + i] = (dof - cdof) / num_no… in DMCreateMatrix_Plex()
3012 if (pblocks) { // Consolidate blocks in DMCreateMatrix_Plex()
3014 pblocks[0] = PetscAbs(pblocks[0]); in DMCreateMatrix_Plex()
3015 for (PetscInt i = 0; i < localSize; i += PetscMax(1, pblocks[i])) { in DMCreateMatrix_Plex()
3016 if (pblocks[i] == 0) continue; in DMCreateMatrix_Plex()
3018 if (pblocks[i] < 0) { in DMCreateMatrix_Plex()
3019 pblocks[i] = -pblocks[i]; in DMCreateMatrix_Plex()
3020 pblocks[nblocks - 1] += pblocks[i]; in DMCreateMatrix_Plex()
3022 pblocks[nblocks++] = pblocks[i]; // nblocks always <= i in DMCreateMatrix_Plex()
3024 for (PetscInt j = 1; j < pblocks[i]; j++) in DMCreateMatrix_Plex()
3025 …pblocks[i + j] == pblocks[i], PETSC_COMM_SELF, PETSC_ERR_PLIB, "Block of size %" PetscInt_FMT " at… in DMCreateMatrix_Plex()
3027 PetscCall(MatSetVariableBlockSizes(*J, nblocks, pblocks)); in DMCreateMatrix_Plex()
3029 PetscCall(PetscFree(pblocks)); in DMCreateMatrix_Plex()