| /petsc/src/ts/impls/implicit/irk/ |
| H A D | irk.c | 30 PetscInt nstages; /* Number of stages */ member 67 PetscErrorCode TSIRKTableauCreate(TS ts, PetscInt nstages, const PetscReal *A, const PetscReal *b, … in TSIRKTableauCreate() argument 73 irk->order = nstages; in TSIRKTableauCreate() 74 …PetscCall(PetscMalloc3(PetscSqr(nstages), &tab->A, PetscSqr(nstages), &tab->A_inv, PetscSqr(nstage… in TSIRKTableauCreate() 75 …PetscCall(PetscMalloc4(nstages, &tab->b, nstages, &tab->c, nstages, &tab->binterp, nstages, &tab->… in TSIRKTableauCreate() 76 PetscCall(PetscArraycpy(tab->A, A, PetscSqr(nstages))); in TSIRKTableauCreate() 77 PetscCall(PetscArraycpy(tab->b, b, nstages)); in TSIRKTableauCreate() 78 PetscCall(PetscArraycpy(tab->c, c, nstages)); in TSIRKTableauCreate() 80 if (binterp) PetscCall(PetscArraycpy(tab->binterp, binterp, nstages)); in TSIRKTableauCreate() 81 if (A_inv) PetscCall(PetscArraycpy(tab->A_inv, A_inv, PetscSqr(nstages))); in TSIRKTableauCreate() [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex74.c | 86 PetscInt nstages, is, ie, matis, matie, *ix, *ix2; in main() local 116 nstages = 2; in main() 117 …PetscCall(PetscOptionsInt("-irk_nstages", "Number of stages in IRK method", "", nstages, &nstages,… in main() 134 PetscCall((*irkcreate)(nstages, &A, &b, &c)); in main() 143 PetscCall(MatCreateSeqBAIJ(PETSC_COMM_SELF, nstages, nstages, nstages, 1, NULL, &A_baij)); in main() 149 PetscCall(PetscArraycpy(A, A_inv, nstages * nstages)); in main() 153 for (s = 0; s < nstages * nstages; s++) A[s] *= 1.0 / ctxt.dt; in main() 154 for (s = 0; s < nstages; s++) b[s] *= (-ctxt.dt); in main() 157 PetscCall(PetscMalloc2(nstages, &At, PetscSqr(nstages), &B)); in main() 158 for (s = 0; s < nstages; s++) { in main() [all …]
|
| /petsc/src/ts/impls/eimex/ |
| H A D | eimex.c | 9 PetscInt nstages; /* Numbers of stages in current scheme */ member 35 const PetscInt ns = ext->nstages; in TSEvaluateStep_EIMEX() 76 const PetscInt ns = ext->nstages; in TSStep_EIMEX() 107 if (ext->ord_adapt && ext->nstages < ext->max_rows) { in TSStep_EIMEX() 109 while (!accept && ext->nstages < ext->max_rows) { in TSStep_EIMEX() 110 …scCall(TSErrorWeightedNorm(ts, ts->vec_sol, T[Map(ext->nstages - 1, ext->nstages - 2, ext->nstages… in TSStep_EIMEX() 114 PetscCall(TSStage_EIMEX(ts, ext->nstages)); in TSStep_EIMEX() 115 ext->nstages++; in TSStep_EIMEX() 119 PetscCall(VecDuplicateVecs(ts->vec_sol, (1 + ext->nstages) * ext->nstages / 2, &ext->T)); in TSStep_EIMEX() 120 for (i = 0; i < ext->nstages - 1; i++) { in TSStep_EIMEX() [all …]
|
| /petsc/src/snes/impls/ms/ |
| H A D | ms.c | 10 PetscInt nstages; /* Number of stages */ member 193 PetscErrorCode SNESMSRegister(SNESMSType name, PetscInt nstages, PetscInt nregisters, PetscReal sta… in SNESMSRegister() argument 200 …PetscCheck(nstages >= 1, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Must have at least one stage"… in SNESMSRegister() 214 t->nstages = nstages; in SNESMSRegister() 219 PetscCall(PetscMalloc1(nstages * nregisters, &t->gamma)); in SNESMSRegister() 220 PetscCall(PetscMalloc1(nstages, &t->delta)); in SNESMSRegister() 221 PetscCall(PetscArraycpy(t->gamma, gamma, nstages * nregisters)); in SNESMSRegister() 222 PetscCall(PetscArraycpy(t->delta, delta, nstages)); in SNESMSRegister() 224 PetscCall(PetscMalloc1(nstages, &t->betasub)); in SNESMSRegister() 225 PetscCall(PetscArraycpy(t->betasub, betasub, nstages)); in SNESMSRegister() [all …]
|
| /petsc/src/ts/impls/explicit/ssp/ |
| H A D | ssp.c | 12 PetscInt nstages; member 60 s = ssp->nstages; in TSSSPStep_RK_2() 93 s = ssp->nstages; in TSSSPStep_RK_3() 307 PetscErrorCode TSSSPSetNumStages(TS ts, PetscInt nstages) in TSSSPSetNumStages() argument 311 PetscTryMethod(ts, "TSSSPSetNumStages_C", (TS, PetscInt), (ts, nstages)); in TSSSPSetNumStages() 330 PetscErrorCode TSSSPGetNumStages(TS ts, PetscInt *nstages) in TSSSPGetNumStages() argument 334 PetscUseMethod(ts, "TSSSPGetNumStages_C", (TS, PetscInt *), (ts, nstages)); in TSSSPGetNumStages() 353 ssp->nstages = 5; in TSSSPSetType_SSP() 357 ssp->nstages = 9; in TSSSPSetType_SSP() 359 ssp->nstages = 5; in TSSSPSetType_SSP() [all …]
|
| /petsc/src/mat/impls/dummy/ |
| H A D | matdummy.c | 25 PetscInt i, nstages = smat->nstages; in MatDestroySubMatrices_Dummy() local 26 for (i = 0; i < nstages; i++) PetscCall(MatDestroy(&(*mat)[n + i])); in MatDestroySubMatrices_Dummy()
|
| /petsc/src/dm/partitioner/impls/multistage/ |
| H A D | mspart.c | 285 static PetscErrorCode PetscPartitionerMultistage_DestroyStages(PetscInt nstages, MPI_Group *groups[… in PetscPartitionerMultistage_DestroyStages() argument 288 for (PetscInt l = 0; l < nstages; l++) { in PetscPartitionerMultistage_DestroyStages() 299 PetscInt nstages = p->levels; in PetscPartitionerReset_Multistage() local 303 PetscCall(PetscPartitionerMultistage_DestroyStages(nstages, &p->lgroup)); in PetscPartitionerReset_Multistage() 304 for (PetscInt l = 0; l < nstages; l++) { in PetscPartitionerReset_Multistage() 572 PetscInt nstages; in PetscPartitionerSetUp_Multistage() local 577 PetscCall(PetscPartitionerMultistage_CreateStages(comm, NULL, &nstages, &groups)); in PetscPartitionerSetUp_Multistage() 578 PetscCall(PetscPartitionerMultistageSetStages(part, nstages, groups)); in PetscPartitionerSetUp_Multistage() 579 PetscCall(PetscPartitionerMultistage_DestroyStages(nstages, &groups)); in PetscPartitionerSetUp_Multistage() 775 PetscInt nstages; in PetscPartitionerSetFromOptions_Multistage() local [all …]
|
| /petsc/src/mat/impls/dense/mpi/ |
| H A D | mmdense.c | 27 PetscInt nmax, nstages, i, pos, max_no; in MatCreateSubMatrices_MPIDense() local 35 nstages = ismax / nmax + ((ismax % nmax) ? 1 : 0); in MatCreateSubMatrices_MPIDense() 38 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, &nstages, 1, MPIU_INT, MPI_MAX, PetscObjectComm((PetscOb… in MatCreateSubMatrices_MPIDense() 40 for (i = 0, pos = 0; i < nstages; i++) { in MatCreateSubMatrices_MPIDense()
|
| /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 564 nstages = ismax / nmax + ((ismax % nmax) ? 1 : 0); /* local nstages */ in MatCreateSubMatrices_MPIBAIJ() 567 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, &nstages, 1, MPIU_INT, MPI_MAX, PetscObjectComm((PetscOb… in MatCreateSubMatrices_MPIBAIJ() 570 PetscCall(PetscCalloc1(ismax + nstages, submat)); in MatCreateSubMatrices_MPIBAIJ() 579 nstages = smat->nstages; in MatCreateSubMatrices_MPIBAIJ() 582 for (i = 0, pos = 0; i < nstages; i++) { in MatCreateSubMatrices_MPIBAIJ() 591 smat->nstages = nstages; in MatCreateSubMatrices_MPIBAIJ() 601 smat->nstages = nstages; in MatCreateSubMatrices_MPIBAIJ()
|
| /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 52 nstages = is_max / nmax + ((is_max % nmax) ? 1 : 0); in MatIncreaseOverlap_MPISBAIJ() 55 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, &nstages, 1, MPIU_INT, MPI_MAX, PetscObjectComm((PetscOb… in MatIncreaseOverlap_MPISBAIJ() 70 for (i = 0, pos = 0; i < nstages; i++) { in MatIncreaseOverlap_MPISBAIJ()
|
| /petsc/src/mat/impls/aij/mpi/ |
| H A D | mpiov.c | 1939 PetscInt nmax, nstages = 0, max_no, nrow, ncol, in[2], out[2]; in MatCreateSubMatrices_MPIAIJ() local 1976 nstages = ismax / nmax + ((ismax % nmax) ? 1 : 0); /* local nstages */ in MatCreateSubMatrices_MPIAIJ() 1979 in[1] = nstages; in MatCreateSubMatrices_MPIAIJ() 1982 nstages = out[1]; /* Make sure every processor loops through the global nstages */ in MatCreateSubMatrices_MPIAIJ() 1998 nstages = smat->nstages; in MatCreateSubMatrices_MPIAIJ() 2008 if (scall == MAT_INITIAL_MATRIX) PetscCall(PetscCalloc1(ismax + nstages, submat)); in MatCreateSubMatrices_MPIAIJ() 2010 for (PetscInt i = 0, pos = 0; i < nstages; i++) { in MatCreateSubMatrices_MPIAIJ() 2019 smat->nstages = nstages; in MatCreateSubMatrices_MPIAIJ() 2029 smat->nstages = nstages; in MatCreateSubMatrices_MPIAIJ()
|
| /petsc/src/mat/impls/aij/seq/ |
| H A D | aij.h | 23 PetscInt nstages; member
|