| /petsc/src/benchmarks/ |
| H A D | Index.c | 19 PetscLogDouble t1, t2; in test1() local 34 PetscCall(PetscTime(&t1)); in test1() 52 PetscCall(PetscTime(&t1)); in test1() 55 fprintf(stdout, "%-27s : %e sec\n", "x[i] = y[i]", (t2 - t1) / 2000.0); in test1() 59 PetscCall(PetscTime(&t1)); in test1() 67 fprintf(stdout, "%-27s : %e sec\n", "x[i] = y[idx[i]] - unroll 4", (t2 - t1) / 2000.0); in test1() 71 PetscCall(PetscTime(&t1)); in test1() 74 fprintf(stdout, "%-27s : %e sec\n", "x[i] = y[idx[i]]", (t2 - t1) / 2000.0); in test1() 78 PetscCall(PetscTime(&t1)); in test1() 84 fprintf(stdout, "%-27s : %e sec\n", "x[i] = y[idx[i]] - unroll 2", (t2 - t1) / 2000.0); in test1() [all …]
|
| H A D | PetscVecNorm.c | 8 PetscLogDouble t1, t2; in main() local 19 PetscCall(PetscTime(&t1)); in main() 33 fprintf(stdout, " Time %g\n", t2 - t1); in main()
|
| /petsc/src/sys/utils/ |
| H A D | sorti.c | 13 #define SWAP1(a, b, t1) \ argument 15 t1 = a; \ 17 b = t1; \ 19 #define SWAP2(a, b, c, d, t1, t2) \ argument 21 t1 = a; \ 23 b = t1; \ 28 #define SWAP3(a, b, c, d, e, f, t1, t2, t3) \ argument 30 t1 = a; \ 32 b = t1; \ 42 #define SWAP2Data(a, b, c, d, t1, t2, siz) \ argument [all …]
|
| /petsc/src/binding/petsc4py/demo/legacy/taosolve/ |
| H A D | rosenbrock.py | 38 t1 = x[2*i+1] - x[2*i] * x[2*i] 40 ff += alpha*t1*t1 + t2*t2; 49 t1 = x[2*i+1] - x[2*i] * x[2*i] 51 G[2*i] = -4*alpha*t1*x[2*i] - 2*t2; 52 G[2*i+1] = 2*alpha*t1; 61 t1 = x[2*i+1] - x[2*i] * x[2*i] 63 ff += alpha*t1*t1 + t2*t2; 64 G[2*i] = -4*alpha*t1*x[2*i] - 2*t2; 65 G[2*i+1] = 2*alpha*t1;
|
| /petsc/src/tao/unconstrained/tutorials/ |
| H A D | rosenbrock3.c | 137 PetscReal ff = 0, t1, t2, alpha = user->alpha; in FormFunctionGradient() local 150 t1 = x[i + 1] - x[i] * x[i]; in FormFunctionGradient() 151 ff += PetscSqr(1 - x[i]) + alpha * t1 * t1; in FormFunctionGradient() 152 g[i] += -2 * (1 - x[i]) + 2 * alpha * t1 * (-2 * x[i]); in FormFunctionGradient() 153 g[i + 1] = 2 * alpha * t1; in FormFunctionGradient() 157 t1 = x[2 * i + 1] - x[2 * i] * x[2 * i]; in FormFunctionGradient() 159 ff += alpha * t1 * t1 + t2 * t2; in FormFunctionGradient() 160 g[2 * i] = -4 * alpha * t1 * x[2 * i] - 2.0 * t2; in FormFunctionGradient() 161 g[2 * i + 1] = 2 * alpha * t1; in FormFunctionGradient() 209 PetscScalar t1 = x[i + 1] - x[i] * x[i]; in FormHessian() local [all …]
|
| H A D | rosenbrock2.c | 132 PetscReal ff = 0, t1, t2, alpha = user->alpha; in FormFunctionGradient() local 145 t1 = x[i + 1] - x[i] * x[i]; in FormFunctionGradient() 146 ff += PetscSqr(1 - x[i]) + alpha * t1 * t1; in FormFunctionGradient() 147 g[i] += -2 * (1 - x[i]) + 2 * alpha * t1 * (-2 * x[i]); in FormFunctionGradient() 148 g[i + 1] = 2 * alpha * t1; in FormFunctionGradient() 152 t1 = x[2 * i + 1] - x[2 * i] * x[2 * i]; in FormFunctionGradient() 154 ff += alpha * t1 * t1 + t2 * t2; in FormFunctionGradient() 155 g[2 * i] = -4 * alpha * t1 * x[2 * i] - 2.0 * t2; in FormFunctionGradient() 156 g[2 * i + 1] = 2 * alpha * t1; in FormFunctionGradient() 205 PetscScalar t1 = x[i + 1] - x[i] * x[i]; in FormHessian() local [all …]
|
| H A D | rosenbrock1.c | 141 PetscReal ff = 0, t1, t2, alpha = user->alpha; in FormFunctionGradient() local 154 t1 = x[i + 1] - x[i] * x[i]; in FormFunctionGradient() 155 ff += PetscSqr(1 - x[i]) + alpha * t1 * t1; in FormFunctionGradient() 156 g[i] += -2 * (1 - x[i]) + 2 * alpha * t1 * (-2 * x[i]); in FormFunctionGradient() 157 g[i + 1] = 2 * alpha * t1; in FormFunctionGradient() 161 t1 = x[2 * i + 1] - x[2 * i] * x[2 * i]; in FormFunctionGradient() 163 ff += alpha * t1 * t1 + t2 * t2; in FormFunctionGradient() 164 g[2 * i] = -4 * alpha * t1 * x[2 * i] - 2.0 * t2; in FormFunctionGradient() 165 g[2 * i + 1] = 2 * alpha * t1; in FormFunctionGradient() 214 PetscScalar t1 = x[i + 1] - x[i] * x[i]; in FormHessian() local [all …]
|
| H A D | rosenbrock1f.F90 | 39 PetscReal ff, t1, t2 56 t1 = x_v(1 + 2*i + 1) - x_v(1 + 2*i)*x_v(1 + 2*i) 58 ff = ff + alpha*t1*t1 + t2*t2 59 g_v(1 + 2*i) = -4*alpha*t1*x_v(1 + 2*i) - 2.0*t2 60 g_v(1 + 2*i + 1) = 2.0*alpha*t1
|
| /petsc/src/sys/classes/draw/impls/x/ |
| H A D | xtone.c | 10 PetscErrorCode PetscDrawInterpolatedTriangle_X(PetscDraw_X *win, int x1, int y_1, int t1, int x2, i… in PetscDrawInterpolatedTriangle_X() argument 26 t1 = t1 << SHIFT_VAL; in PetscDrawInterpolatedTriangle_X() 40 SWAP(t1, t2); in PetscDrawInterpolatedTriangle_X() 45 SWAP(t1, t3); in PetscDrawInterpolatedTriangle_X() 60 t2_t1 = t2 - t1; in PetscDrawInterpolatedTriangle_X() 62 t3_t1 = t3 - t1; in PetscDrawInterpolatedTriangle_X() 68 lc = (int)(lfrac * ((PetscReal)t2_t1) + (PetscReal)t1); in PetscDrawInterpolatedTriangle_X() 72 rc = (int)(rfrac * ((PetscReal)t3_t1) + (PetscReal)t1); in PetscDrawInterpolatedTriangle_X() 100 t1 = rc; in PetscDrawInterpolatedTriangle_X() 104 t3_t1 = t3 - t1; in PetscDrawInterpolatedTriangle_X() [all …]
|
| /petsc/src/sys/classes/bag/ftn-custom/ |
| H A D | zbagf90.c | 14 char *t1, *t2, *ct1; in petscbagregisterstring_() local 15 FIXCHAR(s1, l1, t1); in petscbagregisterstring_() 18 *ierr = PetscBagRegisterString(*bag, (void *)p, (PetscInt)pl, ct1, t1, t2); in petscbagregisterstring_() 21 FREECHAR(s1, t1); in petscbagregisterstring_()
|
| /petsc/src/sys/utils/ftn-custom/ |
| H A D | zstrf.c | 11 char *t1, *t2; in petscstrncpy_() local 14 t1 = s1; in petscstrncpy_() 19 *ierr = PetscStrncpy(t1, t2, m); in petscstrncpy_()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex75.c | 62 PetscScalar t1, t2, t3, t4, t5, t6, t7, t8, t9, t10; in SolKxSolution() local 96 t1 = kn * kn; in SolKxSolution() 102 t14 = 0.4e1 * t7 * t1; in SolKxSolution() 103 t16 = 0.2e1 * t4 * t1; in SolKxSolution() 104 t17 = t1 * t1; in SolKxSolution() 105 …_aa = -0.4e1 * B * t1 * sigma * (t4 + t1) / (t6 + t9 + t12 + t14 + t16 + t17) / (t6 + t9 - t12 + t… in SolKxSolution() 121 t1 = Rm * Rm; in SolKxSolution() 131 t22 = t1 * Rp; in SolKxSolution() 132 t24 = B * t1; in SolKxSolution() 145 t76 = t73 - t75 + t1 - t13 - t18; in SolKxSolution() [all …]
|
| H A D | ex69.c | 206 PetscReal t1, t2, t3, t4, t5, t6, t7, t8, t9, t10; in SolKxSolution() local 251 t1 = kn * kn; in SolKxSolution() 253 t5 = t4 + t1; in SolKxSolution() 258 _aa = -0.4e1 * B * t1 * sigma * t5 / (t6 + 0.4e1 * t8 * t9) / (t6 + 0.4e1 * t16 * t9); in SolKxSolution() 276 t1 = Rm * Rm; in SolKxSolution() 282 t16 = Rp * t1; in SolKxSolution() 287 t24 = B * t1; in SolKxSolution() 300 t76 = t73 - t75 + t1 - t22 - t18; in SolKxSolution() 313 t115 = t73 + t75 + t1 - t22 - t18; in SolKxSolution() 318 … * t1 * t2 * t4 * AA * t9 + ((0.2e1 * Rp * (0.3e1 * t13 * B - 0.2e1 * t16 - t19 - 0.2e1 * t20 - B … in SolKxSolution() [all …]
|
| /petsc/src/tao/complementarity/impls/asls/ |
| H A D | asils.c | 52 PetscCall(VecDuplicate(tao->solution, &asls->t1)); in TaoSetUp_ASILS() 78 …PetscCall(MatDFischer(tao->jacobian, tao->solution, tao->constraints, tao->XL, tao->XU, asls->t1, … in Tao_ASLS_FunctionGradient() 79 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->db)); in Tao_ASLS_FunctionGradient() 80 PetscCall(MatMultTranspose(tao->jacobian, asls->t1, G)); in Tao_ASLS_FunctionGradient() 81 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->da)); in Tao_ASLS_FunctionGradient() 82 PetscCall(VecAXPY(G, 1.0, asls->t1)); in Tao_ASLS_FunctionGradient() 96 PetscCall(VecDestroy(&ssls->t1)); in TaoDestroy_ASILS() 169 PetscCall(VecSet(asls->t1, -asls->identifier)); in TaoSolve_ASILS() 174 PetscCall(VecWhichBetweenOrEqual(asls->t1, asls->db, asls->t2, &asls->fixed)); in TaoSolve_ASILS() 175 PetscCall(ISComplementVec(asls->fixed, asls->t1, &asls->free)); in TaoSolve_ASILS() [all …]
|
| H A D | asfls.c | 52 PetscCall(VecDuplicate(tao->solution, &asls->t1)); in TaoSetUp_ASFLS() 78 …PetscCall(MatDFischer(tao->jacobian, tao->solution, tao->constraints, tao->XL, tao->XU, asls->t1, … in Tao_ASLS_FunctionGradient() 79 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->db)); in Tao_ASLS_FunctionGradient() 80 PetscCall(MatMultTranspose(tao->jacobian, asls->t1, G)); in Tao_ASLS_FunctionGradient() 81 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->da)); in Tao_ASLS_FunctionGradient() 82 PetscCall(VecAXPY(G, 1.0, asls->t1)); in Tao_ASLS_FunctionGradient() 96 PetscCall(VecDestroy(&ssls->t1)); in TaoDestroy_ASFLS() 172 PetscCall(VecSet(asls->t1, -asls->identifier)); in TaoSolve_ASFLS() 177 PetscCall(VecWhichBetweenOrEqual(asls->t1, asls->db, asls->t2, &asls->fixed)); in TaoSolve_ASFLS() 178 PetscCall(ISComplementVec(asls->fixed, asls->t1, &asls->free)); in TaoSolve_ASFLS() [all …]
|
| /petsc/src/sys/classes/viewer/impls/draw/ftn-custom/ |
| H A D | zdrawvf.c | 24 char *t1, *t2, *t3; in petscviewermonitorlgsetup_() local 26 FIXCHAR(host, len1, t1); in petscviewermonitorlgsetup_() 29 *ierr = PetscViewerMonitorLGSetUp(*v, t1, t2, t3, l, names, *x, *y, *m, *n); in petscviewermonitorlgsetup_()
|
| /petsc/src/benchmarks/streams/ |
| H A D | BasicVersion.c | 147 double t1, t2, timesfound[M]; in checktick() local 152 t1 = second(); in checktick() 153 while (((t2 = second()) - t1) < 1.0E-6); in checktick() 154 timesfound[i] = t1 = t2; in checktick()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex43-solcx.h | 12 …PetscReal t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t2… in evaluate_solCx() local 73 t1 = nx * 0.3141592654e1; in evaluate_solCx() 74 t2 = PetscSinReal(t1); in evaluate_solCx() 96 t34 = t1 * xc; in evaluate_solCx() 327 t1 = n * n; in evaluate_solCx() 328 t2 = t1 * n; in evaluate_solCx() 357 t45 = t1 * t5; in evaluate_solCx() 375 t73 = t1 * nx; in evaluate_solCx() 379 t80 = t1 * t1; in evaluate_solCx() 382 t87 = t1 * t19; in evaluate_solCx() [all …]
|
| /petsc/src/dm/tests/ |
| H A D | ex36.c | 117 CCmplx zeta, t1, t2; in DAApplyConformalMapping() local 125 t1 = CCmplxPow(zeta, -1.0); in DAApplyConformalMapping() 126 t2 = CCmplxAdd(zeta, t1); in DAApplyConformalMapping() 131 CCmplx zeta, t1; in DAApplyConformalMapping() local 138 t1 = CCmplxSqrt(zeta); in DAApplyConformalMapping() 139 XX[dim * i] = CCmplxRe(t1); in DAApplyConformalMapping() 140 XX[dim * i + 1] = CCmplxIm(t1); in DAApplyConformalMapping() 142 CCmplx zeta, t1, t2; in DAApplyConformalMapping() local 149 t1 = CCmplxPow(zeta, -1.0); in DAApplyConformalMapping() 150 t2 = CCmplxAdd(zeta, t1); in DAApplyConformalMapping() [all …]
|
| /petsc/src/sys/error/ftn-custom/ |
| H A D | zerrf.c | 85 char *t1; in petscerror_() local 86 FIXCHAR(message, len, t1); in petscerror_() 87 nierr = PetscError(MPI_Comm_f2c(*(comm)), 0, NULL, NULL, *number, *p, "%s", t1); in petscerror_() 88 FREECHAR(message, t1); in petscerror_()
|
| /petsc/src/snes/impls/tr/ |
| H A D | tr.c | 751 if (rho < neP->eta2) delta *= neP->t1; /* shrink the region */ in SNESSolve_NEWTONTR() 850 …PetscOptionsReal("-snes_tr_t1", "t1", "SNESNewtonTRSetUpdateParameters", ctx->t1, &ctx->t1, NULL)); in SNESSetFromOptions_NEWTONTR() 883 PetscCall(PetscViewerASCIIPrintf(viewer, " t1=%g, t2=%g\n", (double)tr->t1, (double)tr->t2)); in SNESView_NEWTONTR() 1021 …teParameters(SNES snes, PetscReal eta1, PetscReal eta2, PetscReal eta3, PetscReal t1, PetscReal t2) in SNESNewtonTRSetUpdateParameters() argument 1030 PetscValidLogicalCollectiveReal(snes, t1, 5); in SNESNewtonTRSetUpdateParameters() 1039 if (t1 == PETSC_DETERMINE) t1 = tr->default_t1; in SNESNewtonTRSetUpdateParameters() 1044 if (t1 != PETSC_CURRENT) tr->t1 = t1; in SNESNewtonTRSetUpdateParameters() 1069 …ameters(SNES snes, PetscReal *eta1, PetscReal *eta2, PetscReal *eta3, PetscReal *t1, PetscReal *t2) in SNESNewtonTRGetUpdateParameters() argument 1079 if (t1) PetscAssertPointer(t1, 5); in SNESNewtonTRGetUpdateParameters() 1087 if (t1) *t1 = tr->t1; in SNESNewtonTRGetUpdateParameters() [all …]
|
| /petsc/src/ksp/pc/impls/lmvm/ |
| H A D | lmvmpc.c | 228 Vec t1, t2; in PCSetUp_LMVM() local 230 PetscCall(MatCreateVecs(pc->mat, &t1, &t2)); in PCSetUp_LMVM() 231 PetscCall(VecGetLocalSize(t1, &n)); in PCSetUp_LMVM() 232 PetscCall(VecGetSize(t1, &N)); in PCSetUp_LMVM() 234 PetscCall(MatLMVMAllocate(B, t1, t2)); in PCSetUp_LMVM() 235 PetscCall(VecDestroy(&t1)); in PCSetUp_LMVM()
|
| /petsc/lib/petsc/bin/maint/generators/ |
| H A D | java.py | 131 t1 = '' 134 t1 = t1 + ','+k+' a'+str(cnt) 144 …\*([, A-Za-z]*)\)','JNIEXPORT void JNICALL Java_'+i+'\\1'+j+' (JNIEnv *a0'+t1+') {'+i+j+'('+t2+');…
|
| /petsc/src/binding/petsc4py/demo/legacy/perftest/ |
| H A D | driver.c | 54 double t1,t2; in RunTest() local 92 PetscCall(PetscTime(&t1)); in RunTest() 95 *wt = PetscMin(*wt,t2-t1); in RunTest()
|
| /petsc/src/ksp/pc/impls/tfs/ |
| H A D | gs.c | 384 PetscInt t1; in gsi_via_bit_mask() local 410 for (i = 0, t1 = 0; i < gs->num_local; i++, reduce++) { in gsi_via_bit_mask() 412 t1++; in gsi_via_bit_mask() 420 if (!t1) { in gsi_via_bit_mask() 428 gs->num_local_gop = t1; in gsi_via_bit_mask() 430 gs->num_local -= t1; in gsi_via_bit_mask() 434 for (i = 0; i < t1; i++) { in gsi_via_bit_mask() 663 PetscInt *iptr, t1, i_start, nel, *elms; in set_pairwise() local 742 t1 = GL_MAX; in set_pairwise() 743 PetscCall(PCTFS_giop(&i_start, &offset, 1, &t1)); in set_pairwise() [all …]
|