| /petsc/src/dm/impls/plex/tests/output/ |
| H A D | ex18_2a.out | 5 r=0 ranks[r]=1 sntCoordinatesPerRank[r]: 7 r=0 ranks[r]=2 sntCoordinatesPerRank[r]: 27 r=1 ranks[r]=2 sntCoordinatesPerRank[r]: 40 r=0 iranks[r]=0 refCoordinatesPerRank[r]: 42 r=0 iranks[r]=0 refCoordinatesPerRank[r]: 61 r=1 iranks[r]=1 refCoordinatesPerRank[r]: 74 r=0 iranks[r]=0 recCoordinatesPerRank[r]: 76 r=0 iranks[r]=0 recCoordinatesPerRank[r]: 95 r=1 iranks[r]=1 recCoordinatesPerRank[r]:
|
| /petsc/src/sys/classes/random/interface/ |
| H A D | random.c | 51 PetscErrorCode PetscRandomGetValue(PetscRandom r, PetscScalar *val) in PetscRandomGetValue() argument 54 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomGetValue() 55 PetscValidType(r, 1); in PetscRandomGetValue() 56 if (!r->ops->getvalue) PetscUseTypeMethod(r, getvalues, 1, val); in PetscRandomGetValue() 57 else PetscUseTypeMethod(r, getvalue, val); in PetscRandomGetValue() 58 PetscCall(PetscObjectStateIncrease((PetscObject)r)); in PetscRandomGetValue() 90 PetscErrorCode PetscRandomGetValueReal(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal() argument 93 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomGetValueReal() 94 PetscValidType(r, 1); in PetscRandomGetValueReal() 95 if (!r->ops->getvaluereal) PetscUseTypeMethod(r, getvaluesreal, 1, val); in PetscRandomGetValueReal() [all …]
|
| H A D | randomc.c | 32 PetscErrorCode PetscRandomDestroy(PetscRandom *r) in PetscRandomDestroy() argument 35 if (!*r) PetscFunctionReturn(PETSC_SUCCESS); in PetscRandomDestroy() 36 PetscValidHeaderSpecific(*r, PETSC_RANDOM_CLASSID, 1); in PetscRandomDestroy() 37 if (--((PetscObject)*r)->refct > 0) { in PetscRandomDestroy() 38 *r = NULL; in PetscRandomDestroy() 41 PetscTryTypeMethod(*r, destroy); in PetscRandomDestroy() 42 PetscCall(PetscHeaderDestroy(r)); in PetscRandomDestroy() 61 PetscErrorCode PetscRandomGetSeed(PetscRandom r, PetscInt64 *seed) in PetscRandomGetSeed() argument 64 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomGetSeed() 67 *seed = (PetscInt64)r->seed; in PetscRandomGetSeed() [all …]
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexcheckinterface.c | 8 PetscMPIInt r; in ExchangeArrayByRank_Private() local 22 …for (r = 0; r < nrranks; r++) PetscCallMPI(MPIU_Irecv(&rsize[r], 1, MPIU_INT, rranks[r], tag, comm… in ExchangeArrayByRank_Private() 23 …for (r = 0; r < nsranks; r++) PetscCallMPI(MPIU_Isend(&ssize[r], 1, MPIU_INT, sranks[r], tag, comm… in ExchangeArrayByRank_Private() 28 for (r = 0; r < nrranks; r++) { in ExchangeArrayByRank_Private() 29 PetscCall(PetscMalloc(rsize[r] * unitsize, &rarr[r])); in ExchangeArrayByRank_Private() 30 PetscCallMPI(MPIU_Irecv(rarr[r], rsize[r], dt, rranks[r], tag, comm, &rreq[r])); in ExchangeArrayByRank_Private() 32 …for (r = 0; r < nsranks; r++) PetscCallMPI(MPIU_Isend(sarr[r], ssize[r], dt, sranks[r], tag, comm,… in ExchangeArrayByRank_Private() 45 PetscMPIInt r; in ExchangeVecByRank_Private() local 54 for (r = 0; r < nsranks; r++) { in ExchangeVecByRank_Private() 55 PetscCall(VecGetLocalSize(svecs[r], &ssize[r])); in ExchangeVecByRank_Private() [all …]
|
| /petsc/src/snes/tutorials/output/ |
| H A D | ex12_p4est_fas_q2_nonconformal_serial.out | 6 …0 KSP preconditioned resid norm 2.499198301910e+02 true resid norm 3.216249248292e+04 ||r(i)||/||b… 7 …1 KSP preconditioned resid norm 8.614011391108e+01 true resid norm 1.952597363694e+04 ||r(i)||/||b… 8 …2 KSP preconditioned resid norm 2.745949105361e+01 true resid norm 1.930071384658e+04 ||r(i)||/||b… 9 …3 KSP preconditioned resid norm 2.559253117247e+01 true resid norm 1.639100195786e+04 ||r(i)||/||b… 10 …4 KSP preconditioned resid norm 2.282154921037e+01 true resid norm 9.122321919069e+03 ||r(i)||/||b… 11 …5 KSP preconditioned resid norm 9.015546483100e+00 true resid norm 2.894802732061e+03 ||r(i)||/||b… 12 …6 KSP preconditioned resid norm 6.311361207223e+00 true resid norm 1.903443566068e+03 ||r(i)||/||b… 13 …7 KSP preconditioned resid norm 3.316691807429e+00 true resid norm 7.510656749157e+02 ||r(i)||/||b… 14 …8 KSP preconditioned resid norm 2.729920508905e+00 true resid norm 6.941012731568e+02 ||r(i)||/||b… 15 …9 KSP preconditioned resid norm 1.834338478600e+00 true resid norm 2.992015148139e+02 ||r(i)||/||b… [all …]
|
| H A D | ex12_mg_newton_coarse_2.out | 48 …0 KSP none resid norm 6.684008878137e-01 true resid norm 2.369800283865e+00 ||r(i)||/||b|| 6.69802… 49 …1 KSP none resid norm 4.919051758707e-01 true resid norm 1.446688201971e+00 ||r(i)||/||b|| 4.08893… 51 …0 KSP none resid norm 1.685610590672e-01 true resid norm 6.624733104703e-01 ||r(i)||/||b|| 8.53704… 52 …1 KSP none resid norm 1.207739862283e-01 true resid norm 3.637848675242e-01 ||r(i)||/||b|| 4.68795… 54 …0 KSP none resid norm 2.290632085617e-02 true resid norm 9.875748570763e-02 ||r(i)||/||b|| 1.27265… 55 …1 KSP none resid norm 1.104804170316e-02 true resid norm 4.650037335364e-02 ||r(i)||/||b|| 5.99232… 57 …0 KSP none resid norm 1.670892201468e-01 true resid norm 5.238432243646e-01 ||r(i)||/||b|| 1.48059… 58 …1 KSP none resid norm 1.116479214105e-01 true resid norm 3.016141020071e-01 ||r(i)||/||b|| 8.52484… 59 …0 KSP preconditioned resid norm 1.010167030378e+01 true resid norm 3.538058091867e+00 ||r(i)||/||b… 61 …0 KSP none resid norm 6.941512558419e-02 true resid norm 1.669565921408e-01 ||r(i)||/||b|| 6.52967… [all …]
|
| H A D | ex12_mg_newton_coarse_1.out | 48 …0 KSP none resid norm 6.684008878137e-01 true resid norm 2.369800283865e+00 ||r(i)||/||b|| 6.69802… 49 …1 KSP none resid norm 4.919051758707e-01 true resid norm 1.446688201971e+00 ||r(i)||/||b|| 4.08893… 51 …0 KSP none resid norm 1.972770829015e-01 true resid norm 7.043302567150e-01 ||r(i)||/||b|| 8.79337… 52 …1 KSP none resid norm 1.447989909233e-01 true resid norm 3.935259572190e-01 ||r(i)||/||b|| 4.91306… 54 …0 KSP none resid norm 2.866055762098e-02 true resid norm 1.135785230348e-01 ||r(i)||/||b|| 1.41799… 55 …1 KSP none resid norm 1.316228500483e-02 true resid norm 5.460594406043e-02 ||r(i)||/||b|| 6.81740… 57 …0 KSP none resid norm 1.173444078295e-01 true resid norm 4.169692340159e-01 ||r(i)||/||b|| 1.17852… 58 …1 KSP none resid norm 5.782659235854e-02 true resid norm 1.983415577601e-01 ||r(i)||/||b|| 5.60594… 59 …0 KSP preconditioned resid norm 7.591373802990e+01 true resid norm 3.538058091867e+00 ||r(i)||/||b… 61 …0 KSP none resid norm 2.582377643796e-02 true resid norm 1.023194016811e-01 ||r(i)||/||b|| 4.96878… [all …]
|
| /petsc/src/ts/utils/ |
| H A D | tsconvest.c | 18 static PetscErrorCode PetscConvEstInitGuessTS_Private(PetscConvEst ce, PetscInt r, DM dm, Vec u) in PetscConvEstInitGuessTS_Private() argument 25 static PetscErrorCode PetscConvEstComputeErrorTS_Private(PetscConvEst ce, PetscInt r, DM dm, Vec u,… in PetscConvEstComputeErrorTS_Private() argument 55 PetscInt Ns, oNs, Nf = ce->Nf, f, Nr = ce->Nr, r; in PetscConvEstGetConvRateTS_Temporal_Private() local 64 for (r = 0; r <= Nr; ++r) { in PetscConvEstGetConvRateTS_Temporal_Private() 65 if (r > 0) { in PetscConvEstGetConvRateTS_Temporal_Private() 66 dt[r] = dt[r - 1] / ce->r; in PetscConvEstGetConvRateTS_Temporal_Private() 67 Ns = PetscCeilReal(Ns * ce->r); in PetscConvEstGetConvRateTS_Temporal_Private() 71 PetscCall(TSSetTimeStep(ts, dt[r])); in PetscConvEstGetConvRateTS_Temporal_Private() 74 PetscCall(PetscConvEstComputeInitialGuess(ce, r, NULL, u)); in PetscConvEstGetConvRateTS_Temporal_Private() 78 PetscCall(PetscConvEstComputeError(ce, r, ce->idm, u, &ce->errors[r * Nf])); in PetscConvEstGetConvRateTS_Temporal_Private() [all …]
|
| /petsc/src/sys/classes/random/impls/sprng/ |
| H A D | sprng.c | 9 static PetscErrorCode PetscRandomSeed_Sprng(PetscRandom r) in PetscRandomSeed_Sprng() argument 12 init_sprng(r->seed, SPRNG_DEFAULT); in PetscRandomSeed_Sprng() 16 static PetscErrorCode PetscRandomGetValue_Sprng(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Sprng() argument 20 if (r->iset) { in PetscRandomGetValue_Sprng() 21 …*val = PetscRealPart(r->width) * sprng() + PetscRealPart(r->low) + (PetscImaginaryPart(r->width) *… in PetscRandomGetValue_Sprng() 26 if (r->iset) *val = r->width * sprng() + r->low; in PetscRandomGetValue_Sprng() 32 static PetscErrorCode PetscRandomGetValueReal_Sprng(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal_Sprng() argument 36 if (r->iset) *val = PetscRealPart(r->width) * sprng() + PetscRealPart(r->low); in PetscRandomGetValueReal_Sprng() 39 if (r->iset) *val = r->width * sprng() + r->low; in PetscRandomGetValueReal_Sprng() 69 PETSC_EXTERN PetscErrorCode PetscRandomCreate_Sprng(PetscRandom r) in PetscRandomCreate_Sprng() argument [all …]
|
| /petsc/src/sys/classes/random/impls/rand/ |
| H A D | rand.c | 3 static PetscErrorCode PetscRandomSeed_Rand(PetscRandom r) in PetscRandomSeed_Rand() argument 6 srand((unsigned int)r->seed); in PetscRandomSeed_Rand() 11 static PetscErrorCode PetscRandomGetValue_Rand(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Rand() argument 15 …if (r->iset) *val = PetscRealPart(r->width) * RAND_WRAP + PetscRealPart(r->low) + (PetscImaginaryP… in PetscRandomGetValue_Rand() 18 if (r->iset) *val = r->width * RAND_WRAP + r->low; in PetscRandomGetValue_Rand() 24 static PetscErrorCode PetscRandomGetValueReal_Rand(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal_Rand() argument 28 if (r->iset) *val = PetscRealPart(r->width) * RAND_WRAP + PetscRealPart(r->low); in PetscRandomGetValueReal_Rand() 31 if (r->iset) *val = r->width * RAND_WRAP + r->low; in PetscRandomGetValueReal_Rand() 61 PETSC_EXTERN PetscErrorCode PetscRandomCreate_Rand(PetscRandom r) in PetscRandomCreate_Rand() argument 64 r->ops[0] = PetscRandomOps_Values; in PetscRandomCreate_Rand() [all …]
|
| /petsc/src/sys/classes/random/impls/rand48/ |
| H A D | rand48.c | 4 static PetscErrorCode PetscRandomSeed_Rand48(PetscRandom r) in PetscRandomSeed_Rand48() argument 7 srand48(r->seed); in PetscRandomSeed_Rand48() 11 static PetscErrorCode PetscRandomGetValue_Rand48(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Rand48() argument 15 if (r->iset) { in PetscRandomGetValue_Rand48() 16 …RealPart(r->width) * (PetscReal)drand48() + PetscRealPart(r->low) + (PetscImaginaryPart(r->width) … in PetscRandomGetValue_Rand48() 21 if (r->iset) *val = r->width * drand48() + r->low; in PetscRandomGetValue_Rand48() 27 static PetscErrorCode PetscRandomGetValueReal_Rand48(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal_Rand48() argument 31 if (r->iset) *val = PetscRealPart(r->width) * drand48() + PetscRealPart(r->low); in PetscRandomGetValueReal_Rand48() 34 if (r->iset) *val = r->width * (PetscReal)drand48() + r->low; in PetscRandomGetValueReal_Rand48() 64 PETSC_EXTERN PetscErrorCode PetscRandomCreate_Rand48(PetscRandom r) in PetscRandomCreate_Rand48() argument [all …]
|
| /petsc/src/sys/classes/random/impls/rander48/ |
| H A D | rander48.c | 35 static PetscErrorCode PetscRandomSeed_Rander48(PetscRandom r) in PetscRandomSeed_Rander48() argument 37 PetscRandom_Rander48 *r48 = (PetscRandom_Rander48 *)r->data; in PetscRandomSeed_Rander48() 41 r48->seed[1] = (unsigned short)r->seed; in PetscRandomSeed_Rander48() 42 r48->seed[2] = (unsigned short)(r->seed >> 16); in PetscRandomSeed_Rander48() 50 static PetscErrorCode PetscRandomGetValue_Rander48(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Rander48() argument 52 PetscRandom_Rander48 *r48 = (PetscRandom_Rander48 *)r->data; in PetscRandomGetValue_Rander48() 56 if (r->iset) { in PetscRandomGetValue_Rander48() 57 *val = PetscRealPart(r->low) + PetscImaginaryPart(r->low) * PETSC_i; in PetscRandomGetValue_Rander48() 58 if (PetscRealPart(r->width)) *val += PetscRealPart(r->width) * _dorander48(r48); in PetscRandomGetValue_Rander48() 59 …if (PetscImaginaryPart(r->width)) *val += PetscImaginaryPart(r->width) * _dorander48(r48) * PETSC_… in PetscRandomGetValue_Rander48() [all …]
|
| /petsc/src/dm/impls/da/tests/output/ |
| H A D | ex1_0.out | 1 [0] p 0 (+0.4619,+0.1913) r=0.50 th=0.125*pi cellid=0 2 [0] p 0 (+0.1913,+0.4619) r=0.50 th=0.375*pi cellid=0 3 [0] p 0 (-0.1913,+0.4619) r=0.50 th=0.625*pi cellid=0 4 [0] p 0 (-0.4619,+0.1913) r=0.50 th=0.875*pi cellid=0 5 [0] p 0 (-0.4619,-0.1913) r=0.50 th=-0.875*pi cellid=0 6 [0] p 0 (-0.1913,-0.4619) r=0.50 th=-0.625*pi cellid=0 7 [0] p 0 (+0.1913,-0.4619) r=0.50 th=-0.375*pi cellid=0 8 [0] p 0 (+0.4619,-0.1913) r=0.50 th=-0.125*pi cellid=0 12 [0] p 0 (+0.4619,+0.1913) r=0.50 th=0.125*pi cellid=5 13 [0] p 0 (+0.1913,+0.4619) r=0.50 th=0.375*pi cellid=7 [all …]
|
| /petsc/src/sys/classes/random/impls/random123/ |
| H A D | random123.c | 19 static PetscErrorCode PetscRandomSeed_Random123(PetscRandom r) in PetscRandomSeed_Random123() argument 22 PetscRandom123 *r123 = (PetscRandom123 *)r->data; in PetscRandomSeed_Random123() 25 ukey.v[0] = (R123_ULONG_LONG)r->seed; in PetscRandomSeed_Random123() 61 static PetscErrorCode PetscRandomGetValue_Random123(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Random123() argument 63 PetscRandom123 *r123 = (PetscRandom123 *)r->data; in PetscRandomGetValue_Random123() 72 if (r->iset) { in PetscRandomGetValue_Random123() 73 re = re * PetscRealPart(r->width) + PetscRealPart(r->low); in PetscRandomGetValue_Random123() 74 im = im * PetscImaginaryPart(r->width) + PetscImaginaryPart(r->low); in PetscRandomGetValue_Random123() 81 if (r->iset) rscal = rscal * r->width + r->low; in PetscRandomGetValue_Random123() 87 static PetscErrorCode PetscRandomGetValueReal_Random123(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal_Random123() argument [all …]
|
| /petsc/src/sys/tests/linter/output/ |
| H A D | testTypes.patch | 4 -PetscErrorCode testTypes(PetscRandom r, PetscViewer v, PetscObject o, PetscFunctionList f) 5 +static PetscErrorCode testTypes(PetscRandom r, PetscViewer v, PetscObject o, PetscFunctionList f) 11 - PetscValidType(r, -1); 12 + PetscValidType(r, 1); 13 PetscCheckSameType(r, -1, v, -1); 17 PetscValidType(r, -1); 18 - PetscCheckSameType(r, -1, v, -1); 19 + PetscCheckSameType(r, 1, v, 2); 21 PetscCheckSameTypeAndComm(r, -3, f, -3); 23 PetscValidType(r, -1); [all …]
|
| H A D | testValidHeaders.patch | 4 -PetscErrorCode testValidHeaders(PetscRandom r, PetscViewer v, PetscDraw d, PetscDrawAxis a) 5 +static PetscErrorCode testValidHeaders(PetscRandom r, PetscViewer v, PetscDraw d, PetscDrawAxis a) 11 - PetscValidHeaderSpecificType(r, PETSC_VIEWER_CLASSID, 0, DMDA); 12 + PetscValidHeaderSpecificType(r, PETSC_RANDOM_CLASSID, 1, DMDA); 17 PetscValidHeaderSpecificType(r, PETSC_VIEWER_CLASSID, 0, DMDA); 23 PetscValidHeaderSpecificType(r, PETSC_VIEWER_CLASSID, 0, DMDA); 39 - PetscValidHeaderSpecific(r, PETSC_DRAW_CLASSID, 0); 40 + PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); 45 PetscValidHeaderSpecific(r, PETSC_DRAW_CLASSID, 0); 51 PetscValidHeaderSpecific(r, PETSC_DRAW_CLASSID, 0); [all …]
|
| /petsc/src/mat/tutorials/ |
| H A D | ex15.c | 10 PetscInt r, N = 10, start, end, *vweights; in main() local 31 for (r = start; r < end; ++r) vweights[r - start] = rank + 1; in main() 33 for (r = start; r < end; ++r) { in main() 34 if (r == 0) { in main() 38 cols[0] = r; in main() 39 cols[1] = r + 1; in main() 43 PetscCall(MatSetValues(A, 1, &r, 2, cols, vals, INSERT_VALUES)); in main() 44 } else if (r == N - 1) { in main() 48 cols[0] = r - 1; in main() 49 cols[1] = r; in main() [all …]
|
| H A D | ex15f.F90 | 10 PetscInt :: r, myStart, myEnd 30 do r = myStart, myEnd - 1 31 if (r == 0) then 34 allocate (cols(2), source=[r, r + 1]) 35 PetscCallA(MatSetValues(A, one, [r], two, cols, vals, INSERT_VALUES, ierr)) 38 else if (r == N - 1) then 41 allocate (cols(2), source=[r - 1, r]) 42 PetscCallA(MatSetValues(A, one, [r], two, cols, vals, INSERT_VALUES, ierr)) 48 allocate (cols(3), source=[r - 1, r, r + 1]) 49 PetscCallA(MatSetValues(A, one, [r], three, cols, vals, INSERT_VALUES, ierr))
|
| /petsc/src/sys/classes/random/impls/curand/ |
| H A D | curand.c | 9 static PetscErrorCode PetscRandomSeed_CURAND(PetscRandom r) in PetscRandomSeed_CURAND() argument 11 PetscRandom_CURAND *curand = (PetscRandom_CURAND *)r->data; in PetscRandomSeed_CURAND() 14 PetscCallCURAND(curandSetPseudoRandomGeneratorSeed(curand->gen, r->seed)); in PetscRandomSeed_CURAND() 20 static PetscErrorCode PetscRandomGetValuesReal_CURAND(PetscRandom r, PetscInt n, PetscReal *val) in PetscRandomGetValuesReal_CURAND() argument 22 PetscRandom_CURAND *curand = (PetscRandom_CURAND *)r->data; in PetscRandomGetValuesReal_CURAND() 31 if (r->iset) PetscCall(PetscRandomCurandScale_Private(r, nn, val, (PetscBool)(n < 0))); in PetscRandomGetValuesReal_CURAND() 35 static PetscErrorCode PetscRandomGetValues_CURAND(PetscRandom r, PetscInt n, PetscScalar *val) in PetscRandomGetValues_CURAND() argument 40 PetscCall(PetscRandomGetValuesReal_CURAND(r, -n, (PetscReal *)val)); in PetscRandomGetValues_CURAND() 42 PetscCall(PetscRandomGetValuesReal_CURAND(r, n, val)); in PetscRandomGetValues_CURAND() 47 static PetscErrorCode PetscRandomDestroy_CURAND(PetscRandom r) in PetscRandomDestroy_CURAND() argument [all …]
|
| /petsc/src/mat/utils/ |
| H A D | zerorows.c | 13 PetscInt r, len = 0; in MatZeroRowsMapLocal_Private() local 19 for (r = 0; r < n; ++r) lrows[r] = -1; in MatZeroRowsMapLocal_Private() 21 for (r = 0; r < N; ++r) { in MatZeroRowsMapLocal_Private() 22 const PetscInt idx = rows[r]; in MatZeroRowsMapLocal_Private() 31 rrows[r].rank = p; in MatZeroRowsMapLocal_Private() 32 rrows[r].index = rows[r] - owners[p]; in MatZeroRowsMapLocal_Private() 43 for (r = 0; r < n; ++r) in MatZeroRowsMapLocal_Private() 44 if (lrows[r] >= 0) lrows[len++] = r; in MatZeroRowsMapLocal_Private()
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_ksp_py.py | 29 def loop(self, ksp, r): argument 31 rnorm = r.norm() 47 r, z = self.work 49 A.mult(x, r) 50 r.aypx(-1, b) 51 P.apply(r, z) 54 A.mult(x, r) 55 r.aypx(-1, b) 56 P.apply(r, z) 70 r, z, d, q = self.work [all …]
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex60.c | 13 PetscInt M = 8, N = 8, m, n, rstart, rend, r; in main() local 37 for (r = rstart; r < rend; ++r) { in main() 39 const PetscInt i = r / N; in main() 40 const PetscInt j = r - i * N; in main() 44 c = r - n; in main() 45 PetscCall(MatSetValues(A, 1, &r, 1, &c, &offdiag, INSERT_VALUES)); in main() 48 c = r + n; in main() 49 PetscCall(MatSetValues(A, 1, &r, 1, &c, &offdiag, INSERT_VALUES)); in main() 52 c = r - 1; in main() 53 PetscCall(MatSetValues(A, 1, &r, 1, &c, &offdiag, INSERT_VALUES)); in main() [all …]
|
| /petsc/src/snes/utils/ |
| H A D | convest.c | 59 …ine_factor", "The increase in resolution in each dimension", "PetscConvEst", ce->r, &ce->r, NULL)); in PetscConvEstSetFromOptions() 177 PetscErrorCode PetscConvEstComputeInitialGuess(PetscConvEst ce, PetscInt r, DM dm, Vec u) in PetscConvEstComputeInitialGuess() argument 183 PetscUseTypeMethod(ce, initguess, r, dm, u); in PetscConvEstComputeInitialGuess() 187 PetscErrorCode PetscConvEstComputeError(PetscConvEst ce, PetscInt r, DM dm, Vec u, PetscReal errors… in PetscConvEstComputeError() argument 194 PetscUseTypeMethod(ce, computeerror, r, dm, u, errors); in PetscConvEstComputeError() 214 PetscErrorCode PetscConvEstMonitorDefault(PetscConvEst ce, PetscInt r) in PetscConvEstMonitorDefault() argument 221 PetscInt *dofs = &ce->dofs[r * ce->Nf]; in PetscConvEstMonitorDefault() 222 PetscReal *errors = &ce->errors[r * ce->Nf]; in PetscConvEstMonitorDefault() 257 static PetscErrorCode PetscConvEstInitGuessSNES_Private(PetscConvEst ce, PetscInt r, DM dm, Vec u) in PetscConvEstInitGuessSNES_Private() argument 264 static PetscErrorCode PetscConvEstComputeErrorSNES_Private(PetscConvEst ce, PetscInt r, DM dm, Vec … in PetscConvEstComputeErrorSNES_Private() argument [all …]
|
| /petsc/src/binding/petsc4py/demo/legacy/kspsolve/ |
| H A D | petsc-cg.py | 8 r = b.duplicate() 13 A.mult(x, r) 14 r.aypx(-1, b) 15 r.copy(d) 16 delta_0 = r.dot(r) 24 r.axpy(-alpha, q) 26 delta = r.dot(r) 28 d.aypx(beta, r)
|
| /petsc/src/sys/tests/ |
| H A D | ex36f.F90 | 10 PetscRandom r, q, r2 16 PetscCallA(PetscRandomCreate(PETSC_COMM_WORLD, r, ierr)) 18 PetscCallA(PetscRandomSetFromOptions(r, ierr)) 19 PetscCallA(PetscRandomGetValue(r, rand, ierr)) 22 PetscCallA(PetscObjectReference(r, ierr)) 23 PetscCallA(PetscObjectGetReference(r, ref, ierr)) 25 PetscCallA(PetscObjectDereference(r, ierr)) 27 PetscCallA(PetscObjectCompose(r, 'test', r2, ierr)) 28 PetscCallA(PetscObjectQuery(r, 'test', q, ierr)) 31 PetscCallA(PetscRandomDestroy(r, ierr))
|