| /petsc/src/sys/objects/ |
| H A D | subcomm.c | 138 PetscErrorCode PetscSubcommSetNumber(PetscSubcomm psubcomm, PetscInt nsubcomm) in PetscSubcommSetNumber() argument 146 PetscCall(PetscMPIIntCast(nsubcomm, &msub)); in PetscSubcommSetNumber() 199 PetscMPIInt i, nsubcomm = psubcomm->n; in PetscSubcommSetTypeGeneral() local 203 …scCheck(nsubcomm >= 1, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "number of subcommunicators %d is inc… in PetscSubcommSetTypeGeneral() 219 PetscCall(PetscCalloc1(nsubcomm, &subsize)); in PetscSubcommSetTypeGeneral() 224 for (icolor = 0; icolor < nsubcomm; icolor++) { in PetscSubcommSetTypeGeneral() 376 PetscMPIInt np_subcomm, nleftover, i, color = -1, rankstart, nsubcomm = psubcomm->n; in PetscSubcommCreate_contiguous() local 384 PetscCall(PetscMalloc1(1 + nsubcomm, &subsize)); in PetscSubcommCreate_contiguous() 386 np_subcomm = size / nsubcomm; in PetscSubcommCreate_contiguous() 387 nleftover = size - nsubcomm * np_subcomm; in PetscSubcommCreate_contiguous() [all …]
|
| /petsc/src/mat/tests/ |
| H A D | ex208.c | 8 PetscInt m = 3, n = 4, i, nsubcomm; in main() local 16 nsubcomm = size; in main() 17 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nsubcomm", &nsubcomm, NULL)); in main() 32 PetscCall(MatCreateRedundantMatrix(A, nsubcomm, MPI_COMM_NULL, MAT_INITIAL_MATRIX, &B)); in main() 33 if (nsubcomm == size) { /* B is a sequential matrix */ in main()
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex37.c | 24 PetscInt nsubcomm = 1, id; in main() local 56 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nsubcomm", &nsubcomm, NULL)); in main() 60 PetscCall(PetscSubcommSetNumber(psubcomm, nsubcomm)); in main() 64 subsize = size / nsubcomm; in main() 65 …tscCheck(subsize * nsubcomm == size, comm, PETSC_ERR_SUP, "This example requires nsubcomm %" Petsc… in main()
|
| /petsc/src/ksp/pc/impls/redundant/ |
| H A D | redundant.c | 16 PetscInt nsubcomm; /* num of data structure PetscSubcomm */ member 50 …cViewerASCIIPrintf(viewer, " First (color=0) of %" PetscInt_FMT " PCs follows\n", red->nsubcomm)); in PCView_Redundant() 297 …t_number", "Number of redundant pc", "PCRedundantSetNumber", red->nsubcomm, &red->nsubcomm, NULL)); in PCSetFromOptions_Redundant() 307 red->nsubcomm = nreds; in PCRedundantSetNumber_Redundant() 389 PetscCall(PetscSubcommSetNumber(red->psubcomm, red->nsubcomm)); in PCRedundantGetKSP_Redundant() 514 red->nsubcomm = size; in PCCreate_Redundant()
|
| /petsc/doc/changes/ |
| H A D | 35.md | 67 - MatGetRedundantMatrix(Mat mat,PetscInt nsubcomm,MPI_Comm 69 replaced by MatRedundantMatrix(Mat mat,PetscInt nsubcomm,MPI_Comm
|
| /petsc/doc/manual/ |
| H A D | advanced.md | 54 MatCreateRedundantMatrix(Mat A,PetscInt nsubcomm,MPI_Comm subcomm,MatReuse reuse,Mat *matredundant); 57 where `nsubcomm` copies of the entire matrix are stored, one on each `subcomm`. The routine `PetscS…
|
| /petsc/src/mat/interface/ |
| H A D | matrix.c | 10472 PetscErrorCode MatCreateRedundantMatrix(Mat mat, PetscInt nsubcomm, MPI_Comm subcomm, MatReuse reus… in MatCreateRedundantMatrix() argument 10486 if (nsubcomm && reuse == MAT_REUSE_MATRIX) { in MatCreateRedundantMatrix() 10492 if (size == 1 || nsubcomm == 1) { in MatCreateRedundantMatrix() 10511 …PetscCheck(nsubcomm >= 1 && nsubcomm <= size, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "nsubcomm must b… in MatCreateRedundantMatrix() 10514 PetscCall(PetscSubcommSetNumber(psubcomm, nsubcomm)); in MatCreateRedundantMatrix()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | Mat.pyx | 3615 def getRedundantMatrix(self, nsubcomm: int, subcomm: Comm | None = None, Mat out=None) -> Mat: 3622 nsubcomm 3636 cdef PetscInt _nsubcomm = asInt(nsubcomm)
|