| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex10.c | 49 Vec x, b, b2; in CreateSystem() local 100 PetscCall(VecCreate(PETSC_COMM_WORLD, &b2)); in CreateSystem() 101 PetscCall(VecSetSizes(b2, n1, PETSC_DECIDE)); in CreateSystem() 102 PetscCall(VecSetFromOptions(b2)); in CreateSystem() 108 PetscCall(VecSetValues(b2, 1, &idx, val + j, INSERT_VALUES)); in CreateSystem() 112 PetscCall(VecAssemblyBegin(b2)); in CreateSystem() 113 PetscCall(VecAssemblyEnd(b2)); in CreateSystem() 114 b = b2; in CreateSystem()
|
| H A D | ex25.c | 35 Vec b, b2; in main() local 59 PetscCall(VecDuplicate(b, &b2)); in main() 60 PetscCall(MatMult(A, x, b2)); in main() 61 PetscCall(VecAXPY(b2, -1.0, b)); in main() 62 PetscCall(VecNorm(b2, NORM_MAX, &nrm)); in main() 65 PetscCall(VecDestroy(&b2)); in main()
|
| H A D | ex9.c | 24 Vec x1, b1, x2, b2; /* solution and RHS vectors for systems #1 and #2 */ in main() local 111 PetscCall(VecDuplicate(u, &b2)); in main() 335 PetscCall(MatMult(C2, u, b2)); in main() 349 PetscCall(KSPSolve(ksp2, b2, x2)); in main() 355 PetscCall(CheckError(u, x2, b2, its, 1.e-4, CHECK_ERROR)); in main() 375 PetscCall(VecDestroy(&b2)); in main()
|
| /petsc/src/binding/petsc4py/demo/legacy/taosolve/ |
| H A D | chwirut.py | 44 b1, b2, b3 = X.array 45 F.array = y - np.exp(-b1*x)/(b2 + b3*x) 52 b1, b2, b3 = X.array 55 v = np.exp(-b1*u)/(b2+b3*u)
|
| /petsc/src/vec/is/tests/ |
| H A D | ex8.c | 8 PetscInt n1, n2, b1, b2; in TestEqual() local 17 PetscCall(ISLocalToGlobalMappingGetBlockSize(m2, &b2)); in TestEqual() 19 flg = (PetscBool)(b1 == b2); in TestEqual() 20 …ETSC_COMM_SELF, "%s: different block sizes %" PetscInt_FMT " %" PetscInt_FMT "\n", tname, b1, b2)); in TestEqual() 41 PetscInt n, n1, n2, b1, b2; in main() local 101 PetscCall(ISLocalToGlobalMappingGetBlockSize(lg2v, &b2)); in main() 102 n2 /= b2; in main() 106 PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_SELF, b2, n2, idx, PETSC_OWN_POINTER, &lg2lh)); in main()
|
| /petsc/src/ts/impls/rosw/ |
| H A D | rosw.c | 408 const PetscReal b2[3] = {-1.7863279495408180e-01, 1. / 3., 8.4529946162074843e-01}; in TSRosWRegisterAll() local 417 PetscCall(TSRosWRegister(TSROSWRA3PW, 3, 3, &A[0][0], &Gamma[0][0], b, b2, 2, &binterpt[0][0])); in TSRosWRegisterAll() 435 …const PetscReal b2[4] = {3.7810903145819369e-01, -9.6042292212423178e-02, 5.0000000000000000e-01, … in TSRosWRegisterAll() local 450 … PetscCall(TSRosWRegister(TSROSWRA34PW2, 3, 4, &A[0][0], &Gamma[0][0], b, b2, 3, &binterpt[0][0])); in TSRosWRegisterAll() 467 …const PetscReal b2[4] = {2.5000000000000000e-01, 7.4276119608319180e-01, -3.1472922970066219e-01, … in TSRosWRegisterAll() local 469 PetscCall(TSRosWRegister(TSROSWR34PRW, 3, 4, &A[0][0], &Gamma[0][0], b, b2, 0, NULL)); in TSRosWRegisterAll() 486 …const PetscReal b2[4] = {5.0000000000000000e-01, -2.5738812086522078e-01, 4.3542008724775044e-01, … in TSRosWRegisterAll() local 488 PetscCall(TSRosWRegister(TSROSWR3PRL2, 3, 4, &A[0][0], &Gamma[0][0], b, b2, 0, NULL)); in TSRosWRegisterAll() 505 const PetscReal b2[4] = {0.75, -0.25, 0.5, 0}; in TSRosWRegisterAll() local 507 PetscCall(TSRosWRegister(TSROSWRODAS3, 3, 4, &A[0][0], &Gamma[0][0], b, b2, 0, NULL)); in TSRosWRegisterAll() [all …]
|
| /petsc/src/sys/classes/draw/impls/image/ |
| H A D | drawimage.h | 87 int x, y, s, a2 = w * w, b2 = h * h; in PetscImageDrawEllipse() local 88 for (x = 0, y = h, s = 2 * b2 + a2 * (1 - 2 * h); b2 * x <= a2 * y; x++) { in PetscImageDrawEllipse() 95 s += b2 * ((4 * x) + 6); in PetscImageDrawEllipse() 97 for (x = w, y = 0, s = 2 * a2 + b2 * (1 - 2 * w); a2 * y <= b2 * x; y++) { in PetscImageDrawEllipse() 101 s += 4 * b2 * (1 - x); in PetscImageDrawEllipse()
|
| /petsc/src/mat/impls/diagonal/tests/ |
| H A D | ex1.c | 8 Vec a, a2, b, b2, c, c2, A_diag, A_inv_diag; in main() local 26 PetscCall(VecDuplicate(b, &b2)); in main() 27 PetscCall(VecCopy(b, b2)); in main() 31 PetscCall(MatCreateDiagonal(b2, &B)); in main() 33 PetscCall(VecDestroy(&b2)); in main() 36 PetscCall(VecDuplicate(b, &b2)); in main() 210 PetscCall(VecDestroy(&b2)); in main()
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex30.c | 29 Vec x, b, u, b2; /* approx solution, RHS, exact solution */ in main() local 181 PetscCall(VecDuplicate(b, &b2)); in main() 287 PetscCall(MatMultTranspose(A, x, b2)); in main() 289 PetscCall(MatMult(A, x, b2)); in main() 291 PetscCall(VecAXPY(b2, -1.0, b)); in main() 292 PetscCall(VecNorm(b2, NORM_2, &rnorm)); in main() 369 PetscCall(VecDestroy(&b2)); in main()
|
| H A D | ex11.c | 43 PetscErrorCode LSCLoadTestOperators(Mat *A11, Mat *A12, Mat *A21, Mat *A22, Vec *b1, Vec *b2) in LSCLoadTestOperators() argument 59 PetscCall(VecCreate(PETSC_COMM_WORLD, b2)); in LSCLoadTestOperators() 69 PetscCall(VecLoad(*b2, viewer)); in LSCLoadTestOperators()
|
| /petsc/src/mat/tests/ |
| H A D | ex23.c | 793 PetscInt b1, b2; in main() local 796 …for (b2 = 0; b2 < bs; b2++) vals[b1 * bs + b2] = i * bs * bs + b1 * bs + b2 + 1 + (b1 == b2 ? 1.0 … in main() 808 PetscInt b1, b2; in main() local 811 for (b2 = 0; b2 < bs; b2++) { in main() 812 …if (PetscAbsScalar(isbd[i * bs * bs + b1 * bs + b2] - aijbd[i * bs * bs + b1 * bs + b2]) > PETSC_S… in main() 814 …\n", rank, i, b1, b2, (double)PetscAbsScalar(isbd[i * bs * bs + b1 * bs + b2]), (double)PetscAbsSc… in main() 1000 Vec x = NULL, b = NULL, b2 = NULL; in TestMatZeroRows() local 1034 PetscCall(VecDuplicate(b, &b2)); in TestMatZeroRows() 1035 PetscCall(VecSetLocalToGlobalMapping(b2, l2gr)); in TestMatZeroRows() 1036 PetscCall(VecCopy(b, b2)); in TestMatZeroRows() [all …]
|
| H A D | ex221.c | 185 Vec x = NULL, b1 = NULL, b2 = NULL; in main() local 209 PetscCall(VecDuplicate(b1, &b2)); in main() 210 PetscCall(VecCopy(b1, b2)); in main() 212 PetscCall(PetscObjectSetName((PetscObject)b2, "A_B2")); in main() 218 PetscCall(MatZeroRowsIS(S, zr, diag, x, b2)); in main() 221 PetscCall(MatZeroRowsColumnsIS(S, zr, diag, x, b2)); in main() 248 PetscCall(VecViewFromOptions(b2, NULL, "-view_b")); in main() 251 PetscCall(VecAXPY(b, -1.0, b2)); in main() 257 PetscCall(VecDestroy(&b2)); in main()
|
| /petsc/src/dm/dt/tests/ |
| H A D | ex1.c | 207 PetscReal a1, b1, a2, b2; in main() local 213 b2 = -0.6; in main() 218 b2 = 0.; in main() 222 PetscCall(CheckJacobiQuadrature(i, a2, b2, PetscDTGaussJacobiQuadrature, 2 * i - 1)); in main() 226 PetscCall(CheckJacobiQuadrature(i, a2, b2, PetscDTGaussLobattoJacobiQuadrature, 2 * i - 3)); in main()
|
| /petsc/src/tao/leastsquares/tutorials/ |
| H A D | tomographyGenerateData.m | 22 [A2, b2, xGT2] = PetscBinaryRead('tomographyData_A_b_xGT'); 24 difference(b2, S(:)); 78 [A2, b2, xGT2] = PetscBinaryRead('cs1Data_A_b_xGT');
|
| /petsc/src/ts/adapt/impls/dsp/ |
| H A D | adaptdsp.c | 122 PetscReal b2 = dsp->kBeta[1]; in TSAdaptChoose_DSP() local 138 rho0 *= PetscPowReal(ctr1, b2); in TSAdaptChoose_DSP() 188 double b1 = (double)dsp->kBeta[0], b2 = (double)dsp->kBeta[1], b3 = (double)dsp->kBeta[2]; in TSAdaptView_DSP() local 189 …ewerASCIIPrintf(viewer, "filter parameters kBeta=[%g,%g,%g] Alpha=[%g,%g]\n", b1, b2, b3, a2, a3)); in TSAdaptView_DSP()
|
| /petsc/src/mat/impls/aij/seq/ |
| H A D | matrart.c | 107 const PetscScalar *b, *b1, *b2, *b3, *b4; in MatMatMatMultNumeric_SeqAIJ_SeqAIJ_SeqDense() local 142 b2 = b1 + bm; in MatMatMatMultNumeric_SeqAIJ_SeqAIJ_SeqDense() 143 b3 = b2 + bm; in MatMatMatMultNumeric_SeqAIJ_SeqAIJ_SeqDense() 157 r2 += (*aa) * b2[*aj]; in MatMatMatMultNumeric_SeqAIJ_SeqAIJ_SeqDense() 167 b2 += bm4; in MatMatMatMultNumeric_SeqAIJ_SeqAIJ_SeqDense()
|
| H A D | matmatmult.c | 1499 const PetscScalar *aa, *b, *b1, *b2, *b3, *b4, *av; in MatMatMultNumericAdd_SeqAIJ_SeqDense() local 1520 b2 = b1 + bm; in MatMatMultNumericAdd_SeqAIJ_SeqDense() 1521 b3 = b2 + bm; in MatMatMultNumericAdd_SeqAIJ_SeqDense() 1523 } else b1 = b2 = b3 = b4 = NULL; in MatMatMultNumericAdd_SeqAIJ_SeqDense() 1538 r2 += aatmp * b2[ajtmp]; in MatMatMultNumericAdd_SeqAIJ_SeqDense() 1556 b2 += bm4; in MatMatMultNumericAdd_SeqAIJ_SeqDense() 1589 r2 += aatmp * b2[ajtmp]; in MatMatMultNumericAdd_SeqAIJ_SeqDense() 1609 r2 += aatmp * b2[ajtmp]; in MatMatMultNumericAdd_SeqAIJ_SeqDense()
|
| /petsc/src/sys/utils/ |
| H A D | mpits.c | 31 PetscMPIInt b1[2], b2[2]; in PetscCommBuildTwoSidedSetType() local 34 PetscCallMPI(MPIU_Allreduce(b1, b2, 2, MPI_INT, MPI_MAX, comm)); in PetscCommBuildTwoSidedSetType() 35 …PetscCheck(-b2[0] == b2[1], comm, PETSC_ERR_ARG_WRONG, "Enum value must be same on all processes"); in PetscCommBuildTwoSidedSetType()
|
| /petsc/src/sys/logging/handler/impls/default/ |
| H A D | logdefault.c | 559 PetscInt64 b1[2], b2[2]; in PetscLogHandlerEventBegin_Default() local 563 PetscCallMPI(MPIU_Allreduce(b1, b2, 2, MPIU_INT64, MPI_MAX, PetscObjectComm(o1))); in PetscLogHandlerEventBegin_Default() 564 …b2[0] == b2[1], PETSC_COMM_SELF, PETSC_ERR_PLIB, "Collective event %s not called collectively %" P… in PetscLogHandlerEventBegin_Default() 624 PetscInt64 b1[2], b2[2]; in PetscLogHandlerEventEnd_Default() local 628 PetscCallMPI(MPIU_Allreduce(b1, b2, 2, MPIU_INT64, MPI_MAX, PetscObjectComm(o1))); in PetscLogHandlerEventEnd_Default() 629 …b2[0] == b2[1], PETSC_COMM_SELF, PETSC_ERR_PLIB, "Collective event %s not called collectively %" P… in PetscLogHandlerEventEnd_Default()
|
| /petsc/src/vec/vec/interface/ |
| H A D | rvector.c | 214 PetscMPIInt b0 = (PetscMPIInt)flg, b1[2], b2[2]; in VecNorm() local 217 PetscCallMPI(MPIU_Allreduce(b1, b2, 2, MPI_INT, MPI_MAX, PetscObjectComm((PetscObject)x))); in VecNorm() 218 …PetscCheck(-b2[0] == b2[1], PetscObjectComm((PetscObject)x), PETSC_ERR_ARG_WRONGSTATE, "Some MPI p… in VecNorm() 220 PetscReal b1[2], b2[2]; in VecNorm() local 223 PetscCallMPI(MPIU_Allreduce(b1, b2, 2, MPIU_REAL, MPIU_MAX, PetscObjectComm((PetscObject)x))); in VecNorm() 224 …PetscCheck((PetscIsNanReal(b2[0]) && PetscIsNanReal(b2[1])) || (-b2[0] == b2[1]), PETSC_COMM_SELF,… in VecNorm()
|
| /petsc/src/dm/partitioner/impls/multistage/ |
| H A D | mspart.c | 388 PetscMPIInt b[2], b2[2], csize, gsize; in PetscPartitionerMultistageSetStages() local 393 PetscCallMPI(MPIU_Allreduce(b, b2, 2, MPI_INT, MPI_MAX, comm)); in PetscPartitionerMultistageSetStages() 394 …PetscCheck(-b2[0] == b2[1], comm, PETSC_ERR_ARG_WRONG, "Initial group must be collectively specifi… in PetscPartitionerMultistageSetStages()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex48.c | 283 PetscScalar b2 = 0; in f0_mhd_B_energy2() local 284 for (int i = 0; i < dim; ++i) b2 += psiDer[i] * psiDer[i]; in f0_mhd_B_energy2() 285 f0[0] = b2; in f0_mhd_B_energy2()
|
| /petsc/lib/petsc/bin/maint/ |
| H A D | toclapack.sh | 2316 static doublereal b1, b2, c1, c2, d1, d2, one, zero, rbase; 2382 b2 = dlamc3_(&d__1, &zero); 2383 d__1 = b2 / rbase; 2388 d2 += b2; 4307 static halfreal b1, b2, c1, c2, d1, d2, one, zero, rbase; 4373 b2 = hlamc3_(&d__1, &zero); 4374 d__1 = b2 / rbase; 4379 d2 += b2;
|
| /petsc/src/ts/impls/multirate/ |
| H A D | mprk.c | 69 …l Abase[], const PetscReal bbase[], PetscReal A1[], PetscReal b1[], PetscReal A2[], PetscReal b2[]) in TSMPRKGenerateTableau2() argument 87 b2[k * s + j] = bbase[j] / ratio; in TSMPRKGenerateTableau2() 93 …tscReal bbase[], PetscReal A1[], PetscReal b1[], PetscReal A2[], PetscReal b2[], PetscReal A3[], P… in TSMPRKGenerateTableau3() argument 121 b2[(k * ratio + n) * s + j] = bbase[j] / ratio / ratio; in TSMPRKGenerateTableau3()
|
| /petsc/src/ts/impls/arkimex/ |
| H A D | arkimex.c | 488 #define b2 (-RC(2.0) + RC(3.0) * c3 + RC(6.0) * g * (RC(1.0) - c3)) / (RC(12.0) * g * (c3 - RC(2.0… in TSARKIMEXRegisterAll() macro 508 {RC(1.0) - b2 - b3 - g, b2, b3, g }, in TSARKIMEXRegisterAll() 510 const PetscReal b[4] = {RC(1.0) - b2 - b3 - g, b2, b3, g}; in TSARKIMEXRegisterAll() 518 #undef b2 in TSARKIMEXRegisterAll()
|