| /petsc/src/mat/tests/ |
| H A D | ex117.c | 12 PetscScalar temp[4]; in main() local 30 temp[0] = 3; in main() 31 temp[1] = 2; in main() 32 temp[2] = 0; in main() 33 temp[3] = 3; in main() 34 PetscCall(MatSetValues(mat, 2, ind1, 2, ind1, temp, INSERT_VALUES)); in main() 37 temp[0] = 1; in main() 38 temp[1] = 1; in main() 39 temp[2] = 2; in main() 40 temp[3] = 1; in main() [all …]
|
| /petsc/src/sys/time/ |
| H A D | cputime.c | 25 struct tms temp; in PetscGetCPUTime() local 28 times(&temp); in PetscGetCPUTime() 29 *t = ((double)temp.tms_utime) / ((double)CLOCKS_PER_SEC); in PetscGetCPUTime() 81 static struct rusage temp; in PetscGetCPUTime() local 85 getrusage(RUSAGE_SELF, &temp); in PetscGetCPUTime() 86 foo = temp.ru_utime.tv_sec; /* seconds */ in PetscGetCPUTime() 87 foo1 = temp.ru_utime.tv_usec; /* uSecs */ in PetscGetCPUTime()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex19.c | 77 PetscScalar u, v, omega, temp; member 222 x[j][i].temp = (grashof > 0) * i * dx; in FormInitialGuess() 274 f[j][i].temp = x[j][i].temp - x[j + 1][i].temp; in FormFunctionLocal() 287 f[j][i].temp = x[j][i].temp - x[j - 1][i].temp; in FormFunctionLocal() 300 f[j][i].temp = x[j][i].temp; in FormFunctionLocal() 313 f[j][i].temp = x[j][i].temp - (PetscReal)(grashof > 0); in FormFunctionLocal() 348 … + vym * (x[j + 1][i].omega - u)) * hx - .5 * grashof * (x[j][i + 1].temp - x[j][i - 1].temp) * hy; in FormFunctionLocal() 351 u = x[j][i].temp; in FormFunctionLocal() 352 uxx = (2.0 * u - x[j][i - 1].temp - x[j][i + 1].temp) * hydhx; in FormFunctionLocal() 353 uyy = (2.0 * u - x[j - 1][i].temp - x[j + 1][i].temp) * hxdhy; in FormFunctionLocal() [all …]
|
| /petsc/src/tao/leastsquares/impls/pounders/ |
| H A D | gqt.c | 8 PetscReal e, temp, w, wm, ynorm, znorm, s, sm; in estsv() local 26 temp = PetscMin(0.01, PetscAbs(r[i + ldr * i])) / PetscAbs(e - z[i]); in estsv() 27 PetscCallBLAS("BLASscal", BLASscal_(&blasn, &temp, z, &blas1)); in estsv() 28 e = temp * e; in estsv() 49 temp = wm - w; in estsv() 51 …if (i < n - 1) PetscCallBLAS("BLASaxpy", BLASaxpy_(&blasnmi, &temp, &r[i + ldr * (i + 1)], &blasld… in estsv() 62 temp = PetscMin(0.01, PetscAbs(r[j + ldr * j] / z[j])); in estsv() 63 PetscCallBLAS("BLASscal", BLASscal_(&blasn, &temp, z, &blas1)); in estsv() 64 ynorm *= temp; in estsv() 71 temp = -z[j]; in estsv() [all …]
|
| /petsc/src/ts/tutorials/ |
| H A D | ex26.c | 98 PetscScalar u, v, omega, temp; member 246 x[j][i].temp = (grashof > 0) * i * dx; in FormInitialSolution() 298 f[j][i].temp = x[j][i].temp - x[j + 1][i].temp; in FormIFunctionLocal() 311 f[j][i].temp = x[j][i].temp - x[j - 1][i].temp; in FormIFunctionLocal() 324 f[j][i].temp = x[j][i].temp; in FormIFunctionLocal() 337 f[j][i].temp = x[j][i].temp - (PetscReal)(grashof > 0); in FormIFunctionLocal() 374 …+ vym * (x[j + 1][i].omega - u)) * hx - .5 * grashof * (x[j][i + 1].temp - x[j][i - 1].temp) * hy); in FormIFunctionLocal() 377 u = x[j][i].temp; in FormIFunctionLocal() 378 uxx = (2.0 * u - x[j][i - 1].temp - x[j][i + 1].temp) * hydhx; in FormIFunctionLocal() 379 uyy = (2.0 * u - x[j - 1][i].temp - x[j + 1][i].temp) * hxdhy; in FormIFunctionLocal() [all …]
|
| H A D | ex50.c | 324 PetscReal **temp, vv; in MatMult_Laplacian() local 339 …ntLaplacianCreate(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in MatMult_Laplacian() 342 for (j = 0; j < appctx->param.N; j++) temp[i][j] = temp[i][j] * vv; in MatMult_Laplacian() 348 …x->param.N - 1) PetscCallBLAS("BLASgemv", BLASgemv_("N", &n, &n, &_DOne, &temp[0][0], &n, &xl[j], … in MatMult_Laplacian() 351 …tLaplacianDestroy(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in MatMult_Laplacian() 364 PetscReal **temp; in MatMult_Advection() local 379 …ntAdvectionCreate(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in MatMult_Advection() 384 …x->param.N - 1) PetscCallBLAS("BLASgemv", BLASgemv_("N", &n, &n, &_DOne, &temp[0][0], &n, &xl[j], … in MatMult_Advection() 387 …tAdvectionDestroy(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in MatMult_Advection() 415 PetscReal **temp; in RHSMatrixLaplaciangllDM() local [all …]
|
| /petsc/src/vec/is/ao/impls/basic/ |
| H A D | aobasic.c | 82 PetscInt *temp; in AOPetscToApplicationPermuteInt_Basic() local 86 PetscCall(PetscMalloc1(ao->N * block, &temp)); in AOPetscToApplicationPermuteInt_Basic() 88 for (j = 0; j < block; j++) temp[i * block + j] = array[aobasic->petsc[i] * block + j]; in AOPetscToApplicationPermuteInt_Basic() 90 PetscCall(PetscArraycpy(array, temp, ao->N * block)); in AOPetscToApplicationPermuteInt_Basic() 91 PetscCall(PetscFree(temp)); in AOPetscToApplicationPermuteInt_Basic() 98 PetscInt *temp; in AOApplicationToPetscPermuteInt_Basic() local 102 PetscCall(PetscMalloc1(ao->N * block, &temp)); in AOApplicationToPetscPermuteInt_Basic() 104 for (j = 0; j < block; j++) temp[i * block + j] = array[aobasic->app[i] * block + j]; in AOApplicationToPetscPermuteInt_Basic() 106 PetscCall(PetscArraycpy(array, temp, ao->N * block)); in AOApplicationToPetscPermuteInt_Basic() 107 PetscCall(PetscFree(temp)); in AOApplicationToPetscPermuteInt_Basic() [all …]
|
| /petsc/src/tao/leastsquares/tutorials/matlab/more_wild_probs/ |
| H A D | dfovec.m | 76 temp = 2*sum/m + 1; variable 78 fvec(i) = -temp; 139 temp = 5*i + c45 + x(3); variable 140 tmp1 = x(2)/temp; 165 temp = i; variable 166 tmp1 = temp/10; 168 (exp(-temp) - exp(-tmp1))*x(3); 172 temp = i; variable 173 fvec(i) = 2 + 2*temp - exp(temp*x(1)) - exp(temp*x(2)); 177 temp = i/5; variable [all …]
|
| H A D | g_dfovec_1d.m | 72 temp= tmp_dfovec_1d_00001+ 1; variable 75 fvec(i)= -temp; 332 temp= tmp_dfovec_1d_00046+ c45+ tmp_x_00035; variable 335 tmp1= tmp_x_00036/ temp; 336 g_tmp1= (temp' \ (g_tmp_x_00036' - g_temp' * tmp1' ))' ; 403 temp= i; variable 404 g_temp= zeros(size(temp)); 406 tmp1= temp/ 10; 422 tmp_dfovec_1d_00056= -temp; 438 temp= i; variable [all …]
|
| /petsc/src/snes/tests/ |
| H A D | ex69.c | 15 PetscScalar u, v, omega, temp; member 197 x[j][i].temp = (grashof > 0) * i * dx; in FormInitialGuess() 255 f[j][i].temp = x[j][i].temp - x[j + 1][i].temp; in FormFunctionLocal() 268 f[j][i].temp = x[j][i].temp - x[j - 1][i].temp; in FormFunctionLocal() 281 f[j][i].temp = x[j][i].temp; in FormFunctionLocal() 294 f[j][i].temp = x[j][i].temp - (PetscReal)(grashof > 0); in FormFunctionLocal() 329 … + vym * (x[j + 1][i].omega - u)) * hx - .5 * grashof * (x[j][i + 1].temp - x[j][i - 1].temp) * hy; in FormFunctionLocal() 332 u = x[j][i].temp; in FormFunctionLocal() 333 uxx = (2.0 * u - x[j][i - 1].temp - x[j][i + 1].temp) * hydhx; in FormFunctionLocal() 334 uyy = (2.0 * u - x[j - 1][i].temp - x[j + 1][i].temp) * hxdhy; in FormFunctionLocal() [all …]
|
| /petsc/src/tao/unconstrained/tutorials/ |
| H A D | burgers_spectral.c | 427 PetscReal **temp; in RHSMatrixLaplaciangllDM() local 437 …ntLaplacianCreate(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSMatrixLaplaciangllDM() 444 for (j = 0; j < appctx->param.N; j++) temp[i][j] = temp[i][j] * vv; in RHSMatrixLaplaciangllDM() 459 …PetscCall(MatSetValuesLocal(A, appctx->param.N, rowsDM, appctx->param.N, rowsDM, &temp[0][0], ADD_… in RHSMatrixLaplaciangllDM() 468 …tLaplacianDestroy(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSMatrixLaplaciangllDM() 489 PetscReal **temp; in RHSMatrixAdvectiongllDM() local 498 …ntAdvectionCreate(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSMatrixAdvectiongllDM() 509 …PetscCall(MatSetValuesLocal(A, appctx->param.N, rowsDM, appctx->param.N, rowsDM, &temp[0][0], ADD_… in RHSMatrixAdvectiongllDM() 518 …tAdvectionDestroy(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSMatrixAdvectiongllDM() 559 Vec temp; in FormFunctionGradient() local [all …]
|
| H A D | spectraladjointassimilation.c | 452 PetscReal **temp; in RHSLaplacian() local 462 …ntLaplacianCreate(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSLaplacian() 467 for (j = 0; j < appctx->param.N; j++) temp[i][j] = temp[i][j] * vv; in RHSLaplacian() 483 …PetscCall(MatSetValuesLocal(A, appctx->param.N, rowsDM, appctx->param.N, rowsDM, &temp[0][0], ADD_… in RHSLaplacian() 492 …tLaplacianDestroy(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSLaplacian() 503 PetscReal **temp; in RHSAdvection() local 513 …ntAdvectionCreate(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSAdvection() 518 for (j = 0; j < appctx->param.N; j++) temp[i][j] = temp[i][j] * vv; in RHSAdvection() 534 …PetscCall(MatSetValuesLocal(A, appctx->param.N, rowsDM, appctx->param.N, rowsDM, &temp[0][0], ADD_… in RHSAdvection() 543 …tAdvectionDestroy(appctx->SEMop.gll.n, appctx->SEMop.gll.nodes, appctx->SEMop.gll.weights, &temp)); in RHSAdvection() [all …]
|
| /petsc/src/sys/memory/ |
| H A D | mem.c | 73 static struct rusage temp; in PetscMemoryGetCurrentUsage() 98 getrusage(RUSAGE_SELF, &temp); in PetscMemoryGetCurrentUsage() 100 *mem = 1024.0 * ((PetscLogDouble)temp.ru_maxrss); in PetscMemoryGetCurrentUsage() 102 *mem = ((PetscLogDouble)getpagesize()) * ((PetscLogDouble)temp.ru_maxrss); in PetscMemoryGetCurrentUsage() 104 *mem = temp.ru_maxrss; in PetscMemoryGetCurrentUsage()
|
| /petsc/src/tao/tutorials/ |
| H A D | ex4.c | 223 Vec z, u, temp; in ObjectiveMisfitADMM() local 229 temp = ctx->workRight[10]; in ObjectiveMisfitADMM() 232 PetscCall(VecCopy(x, temp)); in ObjectiveMisfitADMM() 234 PetscCall(VecAXPBYPCZ(temp, -1., 1., 1., z, u)); in ObjectiveMisfitADMM() 236 PetscCall(VecDot(temp, temp, &workNorm)); in ObjectiveMisfitADMM() 247 Vec z, u, temp; in GradientMisfitADMM() local 253 temp = ctx->workRight[10]; in GradientMisfitADMM() 255 PetscCall(VecCopy(x, temp)); in GradientMisfitADMM() 257 PetscCall(VecAXPBYPCZ(temp, -1., 1., 1., z, u)); in GradientMisfitADMM() 259 PetscCall(VecAXPY(V, mu, temp)); in GradientMisfitADMM() [all …]
|
| /petsc/src/sys/classes/random/impls/rander48/ |
| H A D | rander48.c | 20 unsigned short temp[2]; in _dorander48() local 23 temp[0] = (unsigned short)accu; /* lower 16 bits */ in _dorander48() 26 temp[1] = (unsigned short)accu; /* middle 16 bits */ in _dorander48() 29 r48->seed[0] = temp[0]; in _dorander48() 30 r48->seed[1] = temp[1]; in _dorander48()
|
| /petsc/src/vec/is/utils/ |
| H A D | kdtree.c | 112 …fySortedIndices(PetscKDTree tree, PetscCount sorted_indices[], PetscCount temp[], PetscCount start… in PetscKDTreeVerifySortedIndices() argument 118 PetscCall(PetscArraycpy(temp, &sorted_indices[0 * num_coords + start], range_size)); in PetscKDTreeVerifySortedIndices() 119 PetscCall(PetscSortCount(range_size, temp)); in PetscKDTreeVerifySortedIndices() 120 PetscCall(PetscSortedCheckDupsCount(range_size, temp, &has_duplicates)); in PetscKDTreeVerifySortedIndices() 124 PetscCall(PetscFindCount(sorted_indices[d * num_coords + i], range_size, temp, &location)); in PetscKDTreeVerifySortedIndices() 138 …emAndLeaves(KDTreeBuild kd_build, PetscCount sorted_indices[], PetscCount temp[], PetscCount start… in PetscKDTreeBuildStemAndLeaves() argument 145 …if (kd_build->debug_build) PetscCall(PetscKDTreeVerifySortedIndices(tree, sorted_indices, temp, st… in PetscKDTreeBuildStemAndLeaves() 184 PetscCall(PetscArraycpy(temp, &sorted_indices[0 * num_coords + start], end - start)); in PetscKDTreeBuildStemAndLeaves() 200 …PetscCall(PetscArraycpy(&sorted_indices[(tree->dim - 1) * num_coords + start], temp, end - start)); in PetscKDTreeBuildStemAndLeaves() 202 …PetscCall(PetscKDTreeBuildStemAndLeaves(kd_build, sorted_indices, temp, start, lower + 1, depth + … in PetscKDTreeBuildStemAndLeaves() [all …]
|
| /petsc/src/sys/classes/random/tutorials/ |
| H A D | ex2.c | 115 PetscReal Stk[PETSC_MAXBSIZE], temp; in basketPayoff() local 135 temp = (Stk[i] / St0[i]) - 1; in basketPayoff() 136 if (temp > 0) payoff += temp; in basketPayoff() 145 char temp[50]; in readData() local 156 …PetscCheck(fscanf(fd, "%s%lf%lf", temp, &vv, &tt) == 3, PETSC_COMM_SELF, PETSC_ERR_FILE_UNEXPECTED… in readData()
|
| /petsc/src/ksp/pc/impls/tfs/ |
| H A D | ivec.c | 229 PetscInt *pi, *pj, temp; in PCTFS_ivec_sort() local 291 temp = *pj; in PCTFS_ivec_sort() 293 if (*pi <= temp) break; in PCTFS_ivec_sort() 296 *(pi + 1) = temp; in PCTFS_ivec_sort() 312 PetscInt *pi, *pj, temp, temp2; in PCTFS_ivec_sort_companion() local 398 temp = *pj; in PCTFS_ivec_sort_companion() 401 if (*pi <= temp) break; in PCTFS_ivec_sort_companion() 405 *(pi + 1) = temp; in PCTFS_ivec_sort_companion() 423 PetscInt *pi, *pj, temp, *ptr; in PCTFS_ivec_sort_companion_hack() local 508 temp = *pj; in PCTFS_ivec_sort_companion_hack() [all …]
|
| /petsc/src/binding/petsc4py/src/petsc4py/include/petsc4py/ |
| H A D | petsc4py.i | 251 const Type & ($*ltype temp, Type val, int ecode = 0) { 254 temp = %static_cast(val,$*ltype); 255 $1 = &temp; 267 Type *INPUT ($*ltype temp, int res = 0) { 268 res = SWIG_AsVal(Type)($input, &temp); 270 $1 = &temp; 273 Type &INPUT ($*ltype temp, int res = 0) { 274 res = SWIG_AsVal(Type)($input, &temp); 276 $1 = &temp; 281 Type *OUTPUT ($*ltype temp=0) "$1 = &temp;"; [all …]
|
| /petsc/systems/Apple/OSX/bin/ |
| H A D | makedmg | 12 rm -rf pack.temp.dmg tempsource ${PETSC_DIR}/PETSc-OSX.dmg 29 …ource -volname PETSc -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${size}k pack.temp.dmg 54 rm -rf pack.temp.dmg tempsource
|
| /petsc/src/ts/tests/ |
| H A D | ex35.c | 42 PetscReal temp = 2. * k + 1.; in erfinv() local 43 r += (ck[k] / temp) * PetscPowReal((PetscSqrtReal(PETSC_PI) / 2.) * x, 2. * k + 1.); in erfinv() 94 PetscReal temp; in main() local 98 temp = erfinv(2 * value - 1); in main() 99 v[p * dim] = temp; in main()
|
| /petsc/src/ksp/ksp/impls/gmres/agmres/ |
| H A D | agmresleja.c | 50 PetscScalar *n_cmpl, temp; in KSPAGMRESLejaOrdering() local 61 temp = im[j + 1]; in KSPAGMRESLejaOrdering() 63 im[j] = temp; in KSPAGMRESLejaOrdering()
|
| /petsc/systems/Apple/iOS/bin/ |
| H A D | makedmg | 12 rm -rf pack.temp.dmg tempsource ${PETSC_DIR}/PETSc-iOS.dmg 34 …ource -volname PETSc -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${size}k pack.temp.dmg 59 rm -rf pack.temp.dmg tempsource
|
| /petsc/src/dm/impls/plex/exodusii/ |
| H A D | plexexodusii2.c | 987 PetscInt temp, i; in DMView_PlexExodusII() local 1010 temp = connect[0 + off]; in DMView_PlexExodusII() 1012 connect[1 + off] = temp; in DMView_PlexExodusII() 1014 temp = connect[5 + off]; in DMView_PlexExodusII() 1016 connect[6 + off] = temp; in DMView_PlexExodusII() 1017 temp = connect[7 + off]; in DMView_PlexExodusII() 1019 connect[8 + off] = temp; in DMView_PlexExodusII() 1024 temp = connect[1 + off]; in DMView_PlexExodusII() 1026 connect[3 + off] = temp; in DMView_PlexExodusII() 1028 temp = connect[8 + off]; in DMView_PlexExodusII() [all …]
|
| /petsc/src/vec/vec/impls/mpi/mpiviennacl/ |
| H A D | mpiviennacl.cxx | 55 PetscReal temp[2]; in VecNorm_MPIViennaCL() local 56 PetscCall(VecNorm_SeqViennaCL(xin, NORM_1, temp)); in VecNorm_MPIViennaCL() 57 PetscCall(VecNorm_SeqViennaCL(xin, NORM_2, temp + 1)); in VecNorm_MPIViennaCL() 58 temp[1] = temp[1] * temp[1]; in VecNorm_MPIViennaCL() 59 … PetscCallMPI(MPIU_Allreduce(temp, z, 2, MPIU_REAL, MPIU_SUM, PetscObjectComm((PetscObject)xin))); in VecNorm_MPIViennaCL()
|