| /petsc/src/sys/ftn-custom/ |
| H A D | zutils.c | 48 size_t tmp1 = (size_t)base, tmp2 = 0; in PetscIntAddressToFortran() local 53 if (tmp3 > tmp1) { in PetscIntAddressToFortran() 54 tmp2 = (tmp3 - tmp1) / sizeof(PetscInt); in PetscIntAddressToFortran() 57 tmp2 = (tmp1 - tmp3) / sizeof(PetscInt); in PetscIntAddressToFortran() 61 if (tmp3 > tmp1) { in PetscIntAddressToFortran() 62 tmp2 = (tmp3 - tmp1); in PetscIntAddressToFortran() 65 tmp2 = (tmp1 - tmp3); in PetscIntAddressToFortran() 73 …PETSC_COMM_SELF, (*PetscErrorPrintf)("by an integer. Locations: C %zu Fortran %zu\n", tmp1, tmp3)); in PetscIntAddressToFortran() 96 size_t tmp1 = (size_t)base, tmp2; in PetscScalarAddressToFortran() local 103 if (tmp3 > tmp1) { /* C is bigger than Fortran */ in PetscScalarAddressToFortran() [all …]
|
| /petsc/src/sys/fileio/ |
| H A D | grpath.c | 46 char tmp1[PETSC_MAX_PATH_LEN], char tmp3[PETSC_MAX_PATH_LEN], tmp4[PETSC_MAX_PATH_LEN], *tmp2; in PetscGetRealPath() local 62 PetscCall(PetscStrncpy(tmp1, rpath, N)); in PetscGetRealPath() 63 tmp1[N] = 0; in PetscGetRealPath() 64 n = readlink(tmp1, tmp3, PETSC_MAX_PATH_LEN); in PetscGetRealPath() 69 PetscCall(PetscStrchr(tmp1, '/', &tmp2)); in PetscGetRealPath() 70 PetscCall(PetscStrlen(tmp1, &len1)); in PetscGetRealPath() 73 PetscCall(PetscStrncpy(tmp4, tmp1, m)); in PetscGetRealPath() 81 PetscCall(PetscGetRealPath(tmp3, tmp1)); in PetscGetRealPath() 82 PetscCall(PetscStrncpy(rpath, tmp1, PETSC_MAX_PATH_LEN)); in PetscGetRealPath() 87 PetscCall(PetscStrchr(tmp1, '/', &tmp2)); in PetscGetRealPath() [all …]
|
| /petsc/src/mat/impls/aij/seq/ |
| H A D | inode.c | 375 PetscScalar sum1, sum2, sum3, sum4, sum5, tmp0, tmp1; in MatMult_SeqAIJ_Inode() local 401 tmp1 = x[i2]; in MatMult_SeqAIJ_Inode() 402 sum1 += v1[0] * tmp0 + v1[1] * tmp1; in MatMult_SeqAIJ_Inode() 422 tmp1 = x[i2]; in MatMult_SeqAIJ_Inode() 423 sum1 += v1[0] * tmp0 + v1[1] * tmp1; in MatMult_SeqAIJ_Inode() 425 sum2 += v2[0] * tmp0 + v2[1] * tmp1; in MatMult_SeqAIJ_Inode() 450 tmp1 = x[i2]; in MatMult_SeqAIJ_Inode() 451 sum1 += v1[0] * tmp0 + v1[1] * tmp1; in MatMult_SeqAIJ_Inode() 453 sum2 += v2[0] * tmp0 + v2[1] * tmp1; in MatMult_SeqAIJ_Inode() 455 sum3 += v3[0] * tmp0 + v3[1] * tmp1; in MatMult_SeqAIJ_Inode() [all …]
|
| /petsc/src/tao/leastsquares/tutorials/matlab/more_wild_probs/ |
| H A D | dfovec.m | 123 tmp1 = i; variable 125 tmp3 = tmp1; 129 fvec(i) = y1(i) - (x(1) + tmp1/(x(2)*tmp2 + x(3)*tmp3)); 133 tmp1 = v(i)*(v(i) + x(2)); variable 135 fvec(i) = y2(i) - x(1)*tmp1/tmp2; 140 tmp1 = x(2)/temp; variable 141 tmp2 = exp(tmp1); 166 tmp1 = temp/10; variable 167 fvec(i) = exp(-tmp1*x(1)) - exp(-tmp1*x(2))+ ... 168 (exp(-temp) - exp(-tmp1))*x(3); [all …]
|
| H A D | g_dfovec_1d.m | 270 tmp1= i; variable 271 g_tmp1= zeros(size(tmp1)); 275 tmp3= tmp1; 292 tmp_dfovec_1d_00039= tmp1/ tmp_dfovec_1d_00038; 306 tmp1= v(i)* tmp_dfovec_1d_00041; variable 319 g_tmp_dfovec_1d_00044= g_tmp_x_00034* tmp1+ tmp_x_00034* g_tmp1; 320 tmp_dfovec_1d_00044= tmp_x_00034* tmp1; 335 tmp1= tmp_x_00036/ temp; variable 336 g_tmp1= (temp' \ (g_tmp_x_00036' - g_temp' * tmp1' ))' ; 337 g_tmp2= g_tmp1.* exp(tmp1); [all …]
|
| /petsc/src/tao/tutorials/ |
| H A D | ex3.c | 46 Vec tmp1; member 268 PetscCall(VecDuplicate(user->data, &user->tmp1)); in CreateCtx() 284 PetscCall(VecDestroy(&user->tmp1)); in DestroyCtx() 298 PetscCall(MatMult(user->mass, u, user->tmp1)); in ReducedFunctionGradient() 299 PetscCall(VecDot(u, user->tmp1, &inner)); /* regularisation contribution to */ in ReducedFunctionGradient() 303 PetscCall(VecAXPY(g, alpha, user->tmp1)); /* regularisation contribution to the gradient */ in ReducedFunctionGradient() 306 …PetscCall(VecSetValues(user->tmp1, user->num_bc_dofs, user->bc_indices, user->bc_values, INSERT_VA… in ReducedFunctionGradient() 307 PetscCall(VecAssemblyBegin(user->tmp1)); in ReducedFunctionGradient() 308 PetscCall(VecAssemblyEnd(user->tmp1)); in ReducedFunctionGradient() 309 PetscCall(KSPSolve(user->ksp_laplace, user->tmp1, user->state)); /* forward solve */ in ReducedFunctionGradient() [all …]
|
| /petsc/src/sys/error/ |
| H A D | adebug.c | 340 char *tmp, *tmp1 = NULL; in PetscAttachDebugger() local 367 PetscCall(PetscStrchr(tmp, ' ', &tmp1)); in PetscAttachDebugger() 368 if (!tmp1) break; in PetscAttachDebugger() 369 *tmp1 = 0; in PetscAttachDebugger() 370 tmp = tmp1 + 1; in PetscAttachDebugger()
|
| /petsc/src/dm/dt/interface/ |
| H A D | dtds.c | 1353 PetscPointFn **tmp0, **tmp1; in PetscDSGetResidual() local 1359 PetscCall(PetscWeakFormGetResidual(ds->wf, NULL, 0, f, 0, &n0, &tmp0, &n1, &tmp1)); in PetscDSGetResidual() 1361 *f1 = tmp1 ? tmp1[0] : NULL; in PetscDSGetResidual() 1416 PetscPointFn **tmp0, **tmp1; in PetscDSGetRHSResidual() local 1422 PetscCall(PetscWeakFormGetResidual(ds->wf, NULL, 0, f, 100, &n0, &tmp0, &n1, &tmp1)); in PetscDSGetRHSResidual() 1424 *f1 = tmp1 ? tmp1[0] : NULL; in PetscDSGetRHSResidual() 1510 PetscPointJacFn **tmp0, **tmp1, **tmp2, **tmp3; in PetscDSGetJacobian() local 1517 …PetscCall(PetscWeakFormGetJacobian(ds->wf, NULL, 0, f, g, 0, &n0, &tmp0, &n1, &tmp1, &n2, &tmp2, &… in PetscDSGetJacobian() 1519 *g1 = tmp1 ? tmp1[0] : NULL; in PetscDSGetJacobian() 1648 PetscPointJacFn **tmp0, **tmp1, **tmp2, **tmp3; in PetscDSGetJacobianPreconditioner() local [all …]
|
| /petsc/src/mat/impls/dense/mpi/ |
| H A D | mmdense.c | 333 PetscInt is_max, tmp1, col, *sbuf1_i, is_sz; in MatCreateSubMatrices_MPIDense_Local() local 336 for (tmp1 = 0; tmp1 < nrqs; tmp1++) { /* For each message */ in MatCreateSubMatrices_MPIDense_Local() 337 PetscCallMPI(MPI_Waitany(nrqs, r_waits2, &i, r_status2 + tmp1)); in MatCreateSubMatrices_MPIDense_Local()
|
| /petsc/src/ksp/ksp/impls/ibcgs/ |
| H A D | ibcgs.c | 55 …PetscScalar sigman_2, sigman_1, sigman, pin_1, pin, phin_1, phin, tmp1, tmp2; in KSPSolve_IBCGS() local 176 tmp1 = (alphan / alphan_1) * betan; in KSPSolve_IBCGS() 179 zn[i] = alphan * rn_1[i] + tmp1 * zn_1[i] - tmp2 * vn_1[i]; in KSPSolve_IBCGS()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex7.c | 457 PetscScalar tmp[12], tmp1 = 0.; in TestFreeField() local 465 tmp1 += 2. * PetscSqr(PetscSinReal(0.5 * coef[d] * idx)); in TestFreeField() 470 for (PetscInt i = 0; i < dof; ++i) dh[off + i] += (M + tmp1) * psih[off + i]; in TestFreeField()
|
| /petsc/src/snes/tutorials/ex10d/ |
| H A D | ex10.c | 100 PetscInt *tmp1, *tmp2; in main() local
|
| /petsc/src/ts/utils/dmplexlandau/ |
| H A D | plexland.c | 2333 double tmp1 = 0.; in f0_s_v2() local 2334 for (i = 0; i < dim; ++i) tmp1 += x[i] * x[i]; in f0_s_v2() 2335 f0[0] = tmp1 * u[ii]; in f0_s_v2() 2345 PetscReal tmp1 = 0.; in gamma_n_f() local 2346 for (PetscInt i = 0; i < dim; ++i) tmp1 += x[i] * x[i]; in gamma_n_f() 2348 u[s] = PetscSqrtReal(1. + tmp1 / c02); // u[0] = PetscSqrtReal(1. + xx); in gamma_n_f() 2351 PetscReal xx = tmp1 / c02; in gamma_n_f()
|