| /petsc/src/mat/graphops/color/impls/minpack/ |
| H A D | numsrt.c | 5 PetscErrorCode MINPACKnumsrt(PetscInt *n, PetscInt *nmax, PetscInt *num, PetscInt *mode, PetscInt *… in MINPACKnumsrt() argument 62 i__1 = *nmax; in MINPACKnumsrt() 78 ju = *nmax; in MINPACKnumsrt() 81 jl = *nmax; in MINPACKnumsrt()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | petscopt.pxi | 77 cdef PetscInt nmax = 1024, ndeft = 0 83 if ndeft > nmax: 84 unused = oarray_b(empty_b(ndeft), &nmax, &ivalue) 86 CHKERR(PetscOptionsGetBoolArray(opt, pre, name, ivalue, &nmax, &flag)) 87 if flag==PETSC_TRUE: return array_b(nmax, ivalue).astype('bool') 101 cdef PetscInt nmax = 1024, ndeft = 0 106 if ndeft > nmax: 107 unused = oarray_i(empty_i(ndeft), &nmax, &ivalue) 109 CHKERR(PetscOptionsGetIntArray(opt, pre, name, ivalue, &nmax, &flag)) 110 if flag==PETSC_TRUE: return array_i(nmax, ivalue) [all …]
|
| /petsc/src/vec/vec/utils/ |
| H A D | vecstash.c | 49 stash->nmax = 0; in VecStashCreate_Private() 112 stash->nmax = 0; in VecStashScatterEnd_Private() 183 if (!stash->oldnmax && !stash->nmax) { /* new stash */ in VecStashExpand_Private() 186 } else if (!stash->nmax) { /* reusing stash */ in VecStashExpand_Private() 189 } else newnmax = stash->nmax * 2; in VecStashExpand_Private() 191 if (newnmax < (stash->nmax + incr)) newnmax += 2 * incr; in VecStashExpand_Private() 194 PetscCall(PetscArraycpy(n_array, stash->array, bs * stash->nmax)); in VecStashExpand_Private() 195 PetscCall(PetscArraycpy(n_idx, stash->idx, stash->nmax)); in VecStashExpand_Private() 200 stash->nmax = newnmax; in VecStashExpand_Private() 224 PetscInt nmax, *sindices, *rindices, idx, bs = stash->bs, lastidx; in VecStashScatterBegin_Private() local [all …]
|
| /petsc/src/vec/is/is/tests/ |
| H A D | ex11.c | 8 PetscInt n, i, first, last, nmax = 100; in main() local 22 …cOptionsBoundedInt("-nmax", "Maximum number of keys per process", "ex11.c", nmax, &nmax, NULL, 0)); in main() 26 PetscCall(PetscRandomSetInterval(randsizes, 0., PetscMax(nmax, 1))); in main() 35 n = (PetscInt)PetscMin(r, nmax); in main()
|
| /petsc/src/vec/is/ao/impls/memscalable/ |
| H A D | aomemscalable.c | 96 …PetscInt nmax, *sindices, *rindices, idx, lastidx, *sindices2, *rindices2, *sizes, *star… in AOMap_MemoryScalable_private() local 139 PetscCall(PetscMaxSum(comm, sizes, &nmax, &inreceives)); in AOMap_MemoryScalable_private() 146 PetscCall(PetscMalloc2(nreceives * nmax, &rindices, nreceives, &recv_waits)); in AOMap_MemoryScalable_private() 147 PetscCall(PetscMalloc2(nsends * nmax, &rindices2, nsends, &recv_waits2)); in AOMap_MemoryScalable_private() 157 …for (PetscMPIInt i = 0; i < nreceives; i++) PetscCallMPI(MPIU_Irecv(rindices + nmax * i, nmax, MPI… in AOMap_MemoryScalable_private() 198 rbuf = rindices + nmax * widx; /* global index */ in AOMap_MemoryScalable_private() 273 PetscInt nmax, count, *sindices, *rindices, idx, lastidx; in AOCreateMemoryScalable_private() local 314 PetscCall(PetscMaxSum(comm, sizes, &nmax, &nreceives)); in AOCreateMemoryScalable_private() 318 PetscCall(PetscMalloc2(nreceives * nmax, &rindices, nreceives, &recv_waits)); in AOCreateMemoryScalable_private() 323 …for (i = 0; i < nreceives; i++) PetscCallMPI(MPIU_Irecv(rindices + nmax * i, nmax, MPIU_INT, MPI_A… in AOCreateMemoryScalable_private() [all …]
|
| /petsc/src/ksp/ksp/impls/cg/ |
| H A D | cgeig.c | 9 PetscErrorCode KSPComputeEigenvalues_CG(KSP ksp, PetscInt nmax, PetscReal *r, PetscReal *c, PetscIn… in KSPComputeEigenvalues_CG() argument 18 …PetscCheck(nmax >= n, PetscObjectComm((PetscObject)ksp), PETSC_ERR_ARG_SIZ, "Not enough room in wo… in KSPComputeEigenvalues_CG() 21 PetscCall(PetscArrayzero(c, nmax)); in KSPComputeEigenvalues_CG()
|
| /petsc/src/ksp/ksp/interface/ |
| H A D | itcl.c | 341 PetscInt indx, model[2] = {0, 0}, nmax, max_it; in KSPSetFromOptions() local 409 nmax = ksp->nmax; in KSPSetFromOptions() 411 …"Maximum number of columns treated simultaneously", "KSPSetMatSolveBatchSize", nmax, &nmax, &flg)); in KSPSetFromOptions() 412 if (flg) PetscCall(KSPSetMatSolveBatchSize(ksp, nmax)); in KSPSetFromOptions() 449 nmax = 2; in KSPSetFromOptions() 450 …her's algorithm or its variants for initial guess", "KSPSetUseFischerGuess", model, &nmax, &flag)); in KSPSetFromOptions() 452 PetscCheck(nmax == 2, comm, PETSC_ERR_ARG_OUTOFRANGE, "Must pass in model,size as arguments"); in KSPSetFromOptions() 632 nmax = ksp->nmax; in KSPSetFromOptions() 634 …"Maximum number of columns treated simultaneously", "KSPSetMatSolveBatchSize", nmax, &nmax, &flg)); in KSPSetFromOptions() 635 if (flg) PetscCall(KSPSetMatSolveBatchSize(ksp, nmax)); in KSPSetFromOptions()
|
| /petsc/src/sys/objects/ |
| H A D | options.c | 2898 …s options, const char pre[], const char name[], PetscBool dvalue[], PetscInt *nmax, PetscBool *set) in PetscOptionsGetBoolArray() argument 2908 PetscAssertPointer(nmax, 5); in PetscOptionsGetBoolArray() 2909 if (*nmax) PetscAssertPointer(dvalue, 4); in PetscOptionsGetBoolArray() 2914 *nmax = 0; in PetscOptionsGetBoolArray() 2920 while (value && n < *nmax) { in PetscOptionsGetBoolArray() 2927 *nmax = n; in PetscOptionsGetBoolArray() 2961 …], const char name[], const char *const list[], PetscEnum ivalue[], PetscInt *nmax, PetscBool *set) in PetscOptionsGetEnumArray() argument 2973 PetscAssertPointer(nmax, 6); in PetscOptionsGetEnumArray() 2974 if (*nmax) PetscAssertPointer(ivalue, 5); in PetscOptionsGetEnumArray() 2979 *nmax = 0; in PetscOptionsGetEnumArray() [all …]
|
| H A D | aoptions.c | 349 PetscInt n = 0, nmax = next->arraylength, *dvalue = (PetscInt *)next->data, start, end; in PetscOptionsGetFromTextInput() local 358 while (n < nmax) { in PetscOptionsGetFromTextInput() 377 …nmax, PETSC_COMM_SELF, PETSC_ERR_USER, "Error in %" PetscInt_FMT "-th array entry, not enough spac… in PetscOptionsGetFromTextInput() 409 PetscInt n = 0, nmax = next->arraylength; in PetscOptionsGetFromTextInput() local 417 while (n < nmax) { in PetscOptionsGetFromTextInput() 1112 …nst char opt[], const char text[], const char man[], char *value[], PetscInt *nmax, PetscBool *set) in PetscOptionsStringArray_Private() argument 1118 PetscAssertPointer(nmax, 6); in PetscOptionsStringArray_Private() 1119 …PetscCheck(*nmax >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "n (%" PetscInt_FMT ") cannot be… in PetscOptionsStringArray_Private() 1120 if (*nmax) PetscAssertPointer(value, 5); in PetscOptionsStringArray_Private() 1123 const PetscInt nmaxv = *nmax; in PetscOptionsStringArray_Private() [all …]
|
| /petsc/src/sys/dll/ |
| H A D | reg.c | 66 PetscInt nmax, i; in PetscInitialize_DynamicLibraries() local 78 nmax = 32; in PetscInitialize_DynamicLibraries() 79 PetscCall(PetscOptionsGetStringArray(NULL, NULL, "-dll_prepend", libname, &nmax, NULL)); in PetscInitialize_DynamicLibraries() 80 for (i = 0; i < nmax; i++) { in PetscInitialize_DynamicLibraries() 149 nmax = 32; in PetscInitialize_DynamicLibraries() 150 PetscCall(PetscOptionsGetStringArray(NULL, NULL, "-dll_append", libname, &nmax, NULL)); in PetscInitialize_DynamicLibraries() 151 for (i = 0; i < nmax; i++) { in PetscInitialize_DynamicLibraries()
|
| /petsc/src/mat/impls/dense/mpi/ |
| H A D | mmdense.c | 27 PetscInt nmax, nstages, i, pos, max_no; in MatCreateSubMatrices_MPIDense() local 33 nmax = 20 * 1000000 / (C->cmap->N * sizeof(PetscInt)); in MatCreateSubMatrices_MPIDense() 34 if (!nmax) nmax = 1; in MatCreateSubMatrices_MPIDense() 35 nstages = ismax / nmax + ((ismax % nmax) ? 1 : 0); in MatCreateSubMatrices_MPIDense() 41 if (pos + nmax <= ismax) max_no = nmax; in MatCreateSubMatrices_MPIDense()
|
| /petsc/src/vec/is/is/utils/ |
| H A D | iscoloring.c | 785 PetscErrorCode ISComplement(IS is, PetscInt nmin, PetscInt nmax, IS *isout) in ISComplement() argument 795 …eck(nmin <= nmax, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "nmin %" PetscInt_FMT " cannot be gre… in ISComplement() 804 …nmax, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Index %" PetscInt_FMT "'s value %" PetscInt_FMT … in ISComplement() 812 PetscCall(PetscMalloc1(nmax - nmin - unique, &nindices)); in ISComplement() 814 for (i = nmin, j = 0; i < nmax; i++) { in ISComplement() 820 …nmax - nmin - unique, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Number of entries found in complement %" P… in ISComplement()
|
| /petsc/src/mat/impls/sbaij/mpi/ |
| H A D | sbaijov.c | 19 PetscInt *ai, brow, nz, nis, l, nmax, nstages, max_no, pos; in MatIncreaseOverlap_MPISBAIJ() local 50 nmax = 20 * 1000000 / (c->Nbs * sizeof(PetscInt)); in MatIncreaseOverlap_MPISBAIJ() 51 if (!nmax) nmax = 1; in MatIncreaseOverlap_MPISBAIJ() 52 nstages = is_max / nmax + ((is_max % nmax) ? 1 : 0); in MatIncreaseOverlap_MPISBAIJ() 71 if (pos + nmax <= is_max) max_no = nmax; in MatIncreaseOverlap_MPISBAIJ()
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_is.py | 52 nmax = self.iset.getIndices().max() 53 iset = self.iset.complement(nmin, nmax + 1) 54 iset.complement(nmin, nmax + 1)
|
| /petsc/src/ksp/ksp/impls/hpddm/ |
| H A D | hpddm.cxx | 98 …PetscCheck(ksp->nmax >= std::numeric_limits<int>::min() && ksp->nmax <= std::numeric_limits<int>::… in KSPSetFromOptions_HPDDM() 99 ksp->nmax); in KSPSetFromOptions_HPDDM() 100 data->icntl[1] = static_cast<int>(ksp->nmax); in KSPSetFromOptions_HPDDM() 174 …PetscCheck(ksp->nmax >= std::numeric_limits<int>::min() && ksp->nmax <= std::numeric_limits<int>::… in KSPSetUp_HPDDM() 175 ksp->nmax); in KSPSetUp_HPDDM() 176 data->icntl[1] = static_cast<int>(ksp->nmax); in KSPSetUp_HPDDM()
|
| /petsc/src/dm/impls/da/ |
| H A D | da1.c | 33 PetscInt i, nmax = 0, nmin = PETSC_INT_MAX, navg = 0, *nz, nzlocal; in DMView_DA_1d() local 42 nmax = PetscMax(nmax, nz[i]); in DMView_DA_1d() 48 …Points: Min %" PetscInt_FMT " avg %" PetscInt_FMT " max %" PetscInt_FMT "\n", nmin, navg, nmax)); in DMView_DA_1d()
|
| /petsc/src/mat/utils/ |
| H A D | matstash.c | 60 stash->nmax = 0; in MatStashCreate_Private() 152 stash->nmax = 0; in MatStashScatterEnd_Ref() 226 if (!stash->oldnmax && !stash->nmax) { /* new stash */ in MatStashExpand_Private() 229 } else if (!stash->nmax) { /* reusing stash */ in MatStashExpand_Private() 232 } else cnewnmax = stash->nmax * 2; in MatStashExpand_Private() 233 if (cnewnmax < (stash->nmax + incr)) cnewnmax += 2 * incr; in MatStashExpand_Private() 243 stash->nmax = newnmax; in MatStashExpand_Private() 991 stash->nmax = 0; in MatStashScatterEnd_BTS()
|
| /petsc/src/tao/leastsquares/impls/pounders/ |
| H A D | pounders.h | 7 PetscInt nmax; /* Max(n*(n+1)/2, 5*npmax) */ member
|
| /petsc/src/ksp/ksp/impls/gmres/ |
| H A D | gmreig.c | 42 PetscErrorCode KSPComputeEigenvalues_GMRES(KSP ksp, PetscInt nmax, PetscReal *r, PetscReal *c, Pets… in KSPComputeEigenvalues_GMRES() argument 56 …PetscCheck(nmax >= n, PetscObjectComm((PetscObject)ksp), PETSC_ERR_ARG_SIZ, "Not enough room in wo… in KSPComputeEigenvalues_GMRES() 88 …PetscCheck(nmax >= n, PetscObjectComm((PetscObject)ksp), PETSC_ERR_ARG_SIZ, "Not enough room in wo… in KSPComputeEigenvalues_GMRES()
|
| /petsc/src/ksp/pc/impls/composite/ |
| H A D | composite.c | 242 PetscInt nmax, i; in PCSetFromOptions_Composite() local 251 nmax = (PetscInt)PETSC_STATIC_ARRAY_LENGTH(pcs); in PCSetFromOptions_Composite() 252 …Array("-pc_composite_pcs", "List of composite solvers", "PCCompositeAddPCType", pcs, &nmax, &flg)); in PCSetFromOptions_Composite() 254 for (i = 0; i < nmax; i++) { in PCSetFromOptions_Composite()
|
| /petsc/src/snes/impls/multiblock/ |
| H A D | multiblock.c | 143 PetscInt nmin, nmax; in SNESMultiblockSetDefaults() local 145 PetscCall(MatGetOwnershipRange(snes->jacobian_pre, &nmin, &nmax)); in SNESMultiblockSetDefaults() 147 PetscCall(ISComplement(zerodiags, nmin, nmax, &rest)); in SNESMultiblockSetDefaults() 173 PetscInt nmin, nmax; in SNESMultiblockSetDefaults() local 176 PetscCall(MatGetOwnershipRange(snes->jacobian_pre, &nmin, &nmax)); in SNESMultiblockSetDefaults() 177 PetscCall(ISComplement(blocks->is, nmin, nmax, &is2)); in SNESMultiblockSetDefaults()
|
| /petsc/src/mat/impls/baij/mpi/ |
| H A D | baijov.c | 528 PetscInt nmax, nstages, i, pos, max_no, N = C->cmap->N, bs = C->rmap->bs; in MatCreateSubMatrices_MPIBAIJ() local 541 PetscCall(ISGetLocalSize(iscol[0], &nmax)); in MatCreateSubMatrices_MPIBAIJ() 542 if (nmax == C->cmap->N && flg[1]) PetscCall(ISIdentity(iscol[0], flg + 1)); in MatCreateSubMatrices_MPIBAIJ() 559 if (!C->cmap->N) nmax = 20 * 1000000 / sizeof(PetscInt); in MatCreateSubMatrices_MPIBAIJ() 560 else nmax = 20 * 1000000 / (c->Nbs * sizeof(PetscInt)); in MatCreateSubMatrices_MPIBAIJ() 561 if (!nmax) nmax = 1; in MatCreateSubMatrices_MPIBAIJ() 564 nstages = ismax / nmax + ((ismax % nmax) ? 1 : 0); /* local nstages */ in MatCreateSubMatrices_MPIBAIJ() 583 if (pos + nmax <= ismax) max_no = nmax; in MatCreateSubMatrices_MPIBAIJ()
|
| /petsc/src/mat/impls/maij/ |
| H A D | maij.c | 876 PetscInt m, n, i, ncols, *ilen, nmax = 0, *icols, j, k, ii, dof = b->dof; in MatConvert_SeqMAIJ_SeqAIJ() local 884 nmax = PetscMax(nmax, aij->ilen[i]); in MatConvert_SeqMAIJ_SeqAIJ() 892 PetscCall(PetscMalloc1(nmax, &icols)); in MatConvert_SeqMAIJ_SeqAIJ() 925 PetscInt dof = maij->dof, i, j, *dnz = NULL, *onz = NULL, nmax = 0, onmax = 0; in MatConvert_MPIMAIJ_MPIAIJ() local 933 nmax = PetscMax(nmax, AIJ->ilen[i]); in MatConvert_MPIMAIJ_MPIAIJ() 947 PetscCall(PetscMalloc2(nmax, &icols, onmax, &oicols)); in MatConvert_MPIMAIJ_MPIAIJ()
|
| /petsc/src/snes/impls/composite/ |
| H A D | snescomposite.c | 416 PetscInt nmax = 8, i; in SNESSetFromOptions_Composite() local 426 …snes_composite_sneses", "List of composite solvers", "SNESCompositeAddSNES", sneses, &nmax, &flg)); in SNESSetFromOptions_Composite() 428 for (i = 0; i < nmax; i++) { in SNESSetFromOptions_Composite() 433 …ping", "Damping of the additive composite solvers", "SNESCompositeSetDamping", dmps, &nmax, &flg)); in SNESSetFromOptions_Composite() 435 for (i = 0; i < nmax; i++) PetscCall(SNESCompositeSetDamping(snes, i, dmps[i])); in SNESSetFromOptions_Composite()
|
| /petsc/src/ksp/pc/impls/gasm/ |
| H A D | gasm.c | 15 PetscInt N, n, nmax; member 176 …osm->nmax != PETSC_DETERMINE) PetscCall(PetscSNPrintf(msubdomains, sizeof(msubdomains), "max numbe… in PCView_GASM() 346 osm->nmax = osm->n = 1; in PCSetUp_GASM() 382 if (osm->nmax == PETSC_DETERMINE) { in PCSetUp_GASM() 387 osm->nmax = outwork; in PCSetUp_GASM() 831 osm->nmax = PETSC_DETERMINE; in PCReset_GASM() 921 osm->nmax = PETSC_DETERMINE; in PCGASMSetTotalSubdomains() 939 osm->nmax = PETSC_DETERMINE; in PCGASMSetSubdomains_GASM() 1275 osm->nmax = PETSC_DETERMINE; in PCCreate_GASM()
|