| /petsc/src/ksp/pc/impls/tfs/ |
| H A D | bitmask.c | 20 PetscInt i, tmp; in PCTFS_bm_to_proc() local 27 tmp = BYTE * (p_mask - i - 1); in PCTFS_bm_to_proc() 29 *msg_list = tmp; in PCTFS_bm_to_proc() 33 *msg_list = tmp + 1; in PCTFS_bm_to_proc() 37 *msg_list = tmp + 2; in PCTFS_bm_to_proc() 41 *msg_list = tmp + 3; in PCTFS_bm_to_proc() 45 *msg_list = tmp + 4; in PCTFS_bm_to_proc() 49 *msg_list = tmp + 5; in PCTFS_bm_to_proc() 53 *msg_list = tmp + 6; in PCTFS_bm_to_proc() 57 *msg_list = tmp + 7; in PCTFS_bm_to_proc() [all …]
|
| /petsc/src/snes/tutorials/ |
| H A D | makefile | 23 -${QUIET}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f.tmp 2>&1; 24 -${QUIET}${DIFF} output/ex5f_1.testout ex5f.tmp > ex5f.dtmp; 30 cat ex5f.tmp; \ 33 ${RM} -f ex5f.tmp ex5f.dtmp; 35 …}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19.tmp 2>&1; 36 -${QUIET}${DIFF} ${TESTEX19OUT} ex19.tmp > ex19.dtmp; 42 cat ex19.tmp;\ 45 ${RM} -f ex19.tmp ex19.dtmp; 47 …EXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres -snes_type newtontrdc > ex19.tmp 2>&1; 48 -${QUIET}${DIFF} ${TESTEX19OUT} ex19.tmp > ex19.dtmp; [all …]
|
| /petsc/src/sys/objects/device/tests/ |
| H A D | ex10.c | 21 PetscDeviceContext tmp; in main() local 24 PetscCall(PetscDeviceContextCreate(&tmp)); in main() 25 PetscCall(PetscDeviceContextSetStreamType(tmp, stypes[i])); in main() 26 PetscCall(PetscDeviceContextGetStreamType(tmp, &tmp_type)); in main() 30 PetscCall(PetscDeviceContextSetStreamType(tmp, stypes[j])); in main() 31 PetscCall(PetscDeviceContextGetStreamType(tmp, &tmp_type)); in main() 34 PetscCall(PetscDeviceContextSetStreamType(tmp, stypes[i])); in main() 36 PetscCall(PetscDeviceContextDestroy(&tmp)); in main() 42 PetscDeviceContext tmp; in main() local 45 PetscCall(PetscDeviceContextCreate(&tmp)); in main() [all …]
|
| /petsc/src/sys/fileio/ftn-custom/ |
| H A D | zmprintf.c | 46 char *c1, *tmp; in petscfprintf_() local 49 *ierr = PetscFixSlashN(c1, &tmp); in petscfprintf_() 52 *ierr = PetscFPrintf(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *file, "%s", tmp); in petscfprintf_() 54 *ierr = PetscFree(tmp); in petscfprintf_() 59 char *c1, *tmp; in petscprintf_() local 62 *ierr = PetscFixSlashN(c1, &tmp); in petscprintf_() 65 *ierr = PetscPrintf(MPI_Comm_f2c(*(MPI_Fint *)&*comm), "%s", tmp); in petscprintf_() 67 *ierr = PetscFree(tmp); in petscprintf_() 72 char *c1, *tmp; in petscsynchronizedfprintf_() local 75 *ierr = PetscFixSlashN(c1, &tmp); in petscsynchronizedfprintf_() [all …]
|
| /petsc/src/sys/utils/ |
| H A D | sortip.c | 25 PetscInt tmp, i, vl, last; in PetscSortIntWithPermutation_Private() local 30 if (v[vdx[0]] > v[vdx[1]]) SWAP(vdx[0], vdx[1], tmp); in PetscSortIntWithPermutation_Private() 34 SWAP(vdx[0], vdx[right / 2], tmp); in PetscSortIntWithPermutation_Private() 40 SWAP(vdx[last], vdx[i], tmp); in PetscSortIntWithPermutation_Private() 43 SWAP(vdx[0], vdx[last], tmp); in PetscSortIntWithPermutation_Private() 69 PetscInt j, k, tmp, ik; in PetscSortIntWithPermutation() local 82 SWAP(idx[k], idx[j], tmp); in PetscSortIntWithPermutation() 96 PetscInt tmp, i, last; in PetscSortRealWithPermutation_Private() local 101 if (v[vdx[0]] > v[vdx[1]]) SWAP(vdx[0], vdx[1], tmp); in PetscSortRealWithPermutation_Private() 105 SWAP(vdx[0], vdx[right / 2], tmp); in PetscSortRealWithPermutation_Private() [all …]
|
| H A D | sortd.c | 44 PetscReal vl, tmp; in PetscSortReal_Private() local 49 if (v[0] > v[1]) SWAP(v[0], v[1], tmp); in PetscSortReal_Private() 53 SWAP(v[0], v[right / 2], tmp); in PetscSortReal_Private() 59 SWAP(v[last], v[i], tmp); in PetscSortReal_Private() 62 SWAP(v[0], v[last], tmp); in PetscSortReal_Private() 91 PetscReal tmp, vk; in PetscSortReal() local 96 SWAP(v[k], v[j], tmp); in PetscSortReal() 282 PetscScalar d, tmp; in PetscSortSplit() local 300 tmp = a[mid]; in PetscSortSplit() 304 a[j] = tmp; in PetscSortSplit() [all …]
|
| H A D | psplit.c | 90 PetscInt tmp; in PetscSplitOwnership() local 91 PetscCallMPI(MPIU_Allreduce(n, &tmp, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnership() 92 …tmp == *N, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Sum of local lengths %" PetscInt_FMT " does not eq… in PetscSplitOwnership() 151 PetscInt tmp; in PetscSplitOwnershipEqual() local 152 PetscCallMPI(MPIU_Allreduce(n, &tmp, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnershipEqual() 153 …tmp == *N, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Sum of local lengths %" PetscInt_FMT " does not eq… in PetscSplitOwnershipEqual()
|
| /petsc/src/sys/classes/viewer/impls/socket/mex-scripts/ |
| H A D | swrite.c | 32 int *tmp = (int *)mxMalloc((cnt + 5) * sizeof(int)); in mexFunction() local 34 for (i = 0; i < cnt; i++) tmp[i] = (int)t[i]; in mexFunction() 35 ierr = PetscBinaryWrite(fd, tmp, cnt, (PetscDataType)dt); in mexFunction() 37 mxFree(tmp); in mexFunction() 39 char *tmp = (char *)mxMalloc((cnt + 5) * sizeof(char)); in mexFunction() local 40 mxGetNChars(prhs[1], tmp, cnt + 1); in mexFunction() 41 ierr = PetscBinaryWrite(fd, tmp, cnt, (PetscDataType)dt); in mexFunction() 43 mxFree(tmp); in mexFunction()
|
| H A D | bread.c | 19 int tmp; in SYByteSwapInt() local 20 char *ptr1, *ptr2 = (char *)&tmp; in SYByteSwapInt() 24 buff[j] = tmp; in SYByteSwapInt() 32 short tmp; in SYByteSwapShort() local 33 char *ptr1, *ptr2 = (char *)&tmp; in SYByteSwapShort() 37 buff[j] = tmp; in SYByteSwapShort() 46 double tmp, *buff1 = (double *)buff; in SYByteSwapScalar() local 47 char *ptr1, *ptr2 = (char *)&tmp; in SYByteSwapScalar() 54 buff1[j] = tmp; in SYByteSwapScalar()
|
| /petsc/src/sys/classes/viewer/impls/ascii/ftn-custom/ |
| H A D | zfilevf.c | 31 char *c1, *tmp; in petscviewerasciiprintf_() local 36 *ierr = PetscFixSlashN(c1, &tmp); in petscviewerasciiprintf_() 39 *ierr = PetscViewerASCIIPrintf(v, "%s", tmp); in petscviewerasciiprintf_() 41 *ierr = PetscFree(tmp); in petscviewerasciiprintf_() 46 char *c1, *tmp; in petscviewerasciisynchronizedprintf_() local 51 *ierr = PetscFixSlashN(c1, &tmp); in petscviewerasciisynchronizedprintf_() 54 *ierr = PetscViewerASCIISynchronizedPrintf(v, "%s", tmp); in petscviewerasciisynchronizedprintf_() 56 *ierr = PetscFree(tmp); in petscviewerasciisynchronizedprintf_()
|
| /petsc/src/vec/is/is/tests/ |
| H A D | ex13.c | 40 IS tmp; in main() local 64 PetscCall(CreateIS(comm, type, n, first + offset, step, &tmp)); in main() 65 PetscCall(ISDuplicate(tmp, &is[j])); in main() 66 PetscCall(ISCopy(tmp, is[j])); in main() 67 PetscCall(ISDestroy(&tmp)); in main() 78 PetscCall(CreateIS(comm, type, n, first + offset, step, &tmp)); in main() 79 PetscCall(ISDuplicate(tmp, &is[j])); in main() 80 PetscCall(ISShift(tmp, 0, is[j])); in main() 81 PetscCall(ISDestroy(&tmp)); in main() 84 PetscCall(CreateIS(comm, type, n, first, step, &tmp)); in main() [all …]
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_mat_py.py | 76 tmp = PETSc.Mat() 77 A.transpose(tmp) 78 product.setType(tmp.getType()) 79 product.setSizes(tmp.getSizes()) 82 tmp.copy(product) 87 tmp = PETSc.Mat() 88 B.transpose(tmp) 89 product.setType(tmp.getType()) 90 product.setSizes(tmp.getSizes()) 93 tmp.copy(product) [all …]
|
| /petsc/src/vec/pf/impls/string/ |
| H A D | cstring.c | 59 char task[1024], tmp[PETSC_MAX_PATH_LEN], lib[PETSC_MAX_PATH_LEN]; in PFStringSetFunction() local 72 PetscCall(PetscGetTmp(PetscObjectComm((PetscObject)pf), tmp, PETSC_STATIC_ARRAY_LENGTH(tmp))); in PFStringSetFunction() 75 PetscCall(PetscGetTmp(PetscObjectComm((PetscObject)pf), tmp, PETSC_STATIC_ARRAY_LENGTH(tmp))); in PFStringSetFunction() 78 PetscCall(PetscStrncpy(tmp, ".", sizeof(tmp))); in PFStringSetFunction() 82 …scInt_FMT " -f makefile libpetscdlib STRINGFUNCTION=\"%s\" %s ; sync\n", tmp, pf->dimin, pf->dim… in PFStringSetFunction() 89 PetscCall(PetscSNPrintf(lib, PETSC_STATIC_ARRAY_LENGTH(lib), "%s/${USERNAME}/libpetscdlib", tmp)); in PFStringSetFunction()
|
| /petsc/src/tao/leastsquares/tutorials/matlab/ |
| H A D | matlab_ls_test.c | 101 PetscScalar tmp; in main() local 136 PetscCall(PetscMatlabEngineGetArray(user.mengine, 1, 1, &tmp, "n")); in main() 137 user.n = (int)tmp; in main() 138 PetscCall(PetscMatlabEngineGetArray(user.mengine, 1, 1, &tmp, "m")); in main() 139 user.m = (int)tmp; in main() 140 PetscCall(PetscMatlabEngineGetArray(user.mengine, 1, 1, &tmp, "nfmax")); in main() 141 user.nfmax = (int)tmp; in main() 142 PetscCall(PetscMatlabEngineGetArray(user.mengine, 1, 1, &tmp, "npmax")); in main() 143 user.npmax = (int)tmp; in main() 144 PetscCall(PetscMatlabEngineGetArray(user.mengine, 1, 1, &tmp, "delta")); in main() [all …]
|
| /petsc/src/mat/impls/baij/seq/ |
| H A D | baijsolvtrannat1.c | 9 PetscScalar *x, *tmp, s1; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() local 16 tmp = a->solve_work; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 19 for (i = 0; i < n; i++) tmp[i] = b[i]; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 26 s1 = tmp[i]; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 28 for (j = 0; j < nz; j++) tmp[vi[j]] -= s1 * v[j]; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 29 tmp[i] = s1; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 37 s1 = tmp[i]; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 38 for (j = 0; j < nz; j++) tmp[vi[j]] -= s1 * v[j]; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering() 42 for (i = 0; i < n; i++) x[i] = tmp[i]; in MatSolveTranspose_SeqBAIJ_1_NaturalOrdering()
|
| H A D | baijsolvtran1.c | 11 PetscScalar *x, *tmp, s1; in MatSolveTranspose_SeqBAIJ_1() local 18 tmp = a->solve_work; in MatSolveTranspose_SeqBAIJ_1() 26 for (i = 0; i < n; i++) tmp[i] = b[c[i]]; in MatSolveTranspose_SeqBAIJ_1() 33 s1 = tmp[i]; in MatSolveTranspose_SeqBAIJ_1() 35 for (j = 0; j < nz; j++) tmp[vi[j]] -= s1 * v[j]; in MatSolveTranspose_SeqBAIJ_1() 36 tmp[i] = s1; in MatSolveTranspose_SeqBAIJ_1() 44 s1 = tmp[i]; in MatSolveTranspose_SeqBAIJ_1() 45 for (j = 0; j < nz; j++) tmp[vi[j]] -= s1 * v[j]; in MatSolveTranspose_SeqBAIJ_1() 49 for (i = 0; i < n; i++) x[r[i]] = tmp[i]; in MatSolveTranspose_SeqBAIJ_1()
|
| /petsc/src/snes/tests/ |
| H A D | ex1.c | 276 PetscReal tmp[5]; in main() local 278 PetscCall(SNESNewtonTRGetTolerances(snes, &tmp[0], &tmp[1], &tmp[2])); in main() 279 PetscCheck(tmp[0] == 1.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() 280 PetscCheck(tmp[1] == 2.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() 281 PetscCheck(tmp[2] == 3.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() 282 PetscCall(SNESNewtonTRGetUpdateParameters(snes, &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4])); in main() 283 PetscCheck(tmp[0] == 4.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() 284 PetscCheck(tmp[1] == 5.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() 285 PetscCheck(tmp[2] == 6.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() 286 PetscCheck(tmp[3] == 7.0, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Wrong value"); in main() [all …]
|
| /petsc/src/ts/tutorials/hybrid/ |
| H A D | ex1fd.c | 49 PetscScalar tmp[2], A1[2][2], A2[2], denorm1, denorm2; in ShiftGradients() local 81 tmp[0] = A1[0][0] * x[0] + A1[0][1] * x[1]; in ShiftGradients() 82 tmp[1] = A1[1][0] * x[0] + A1[1][1] * x[1]; in ShiftGradients() 84 x[0] = tmp[0]; in ShiftGradients() 85 x[1] = tmp[1]; in ShiftGradients() 91 tmp[0] = A1[0][0] * x[0] + A1[0][1] * x[1]; in ShiftGradients() 92 tmp[1] = A1[1][0] * x[0] + A1[1][1] * x[1]; in ShiftGradients() 94 x[0] = tmp[0]; in ShiftGradients() 95 x[1] = tmp[1]; in ShiftGradients() 198 PetscScalar tmp[2], sensi[2]; in main() local [all …]
|
| /petsc/src/mat/impls/nest/ftn-custom/ |
| H A D | zmatnestf.c | 16 Mat *m, *tmp; in matcreatenest_() local 25 tmp = &a[i]; in matcreatenest_() 26 CHKFORTRANNULLOBJECT(tmp); in matcreatenest_() 32 m[i] = (tmp == NULL ? NULL : a[i]); in matcreatenest_() 41 Mat *m, *tmp; in matnestsetsubmats_() local 51 tmp = &a[i]; in matnestsetsubmats_() 52 CHKFORTRANNULLOBJECT(tmp); in matnestsetsubmats_() 60 m[i] = (tmp == NULL ? NULL : a[i]); in matnestsetsubmats_()
|
| /petsc/src/sys/tests/ |
| H A D | makefile | 12 ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ${PYTHON_EXE} ./ex55.py > ex55.tmp 2>&1; 13 -@if [ ! -s ex55.tmp ]; then \ 18 cat ex55.tmp; \ 21 ${RM} -f ex55.tmp
|
| /petsc/src/vec/is/utils/ |
| H A D | isltog.h | 9 PetscInt i, nf = 0, tmp, start, end, bs; in ISGlobalToLocalMappingApply() local 38 GTOL(idx[i], tmp); in ISGlobalToLocalMappingApply() 39 if (tmp < 0) continue; in ISGlobalToLocalMappingApply() 40 idxout[nf++] = tmp; in ISGlobalToLocalMappingApply() 47 GTOL(idx[i], tmp); in ISGlobalToLocalMappingApply() 48 if (tmp < 0) continue; in ISGlobalToLocalMappingApply()
|
| /petsc/src/vec/vec/tutorials/ |
| H A D | makefile | 14 -${QUIET}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex31 > ex31.tmp 2>&1; 15 -${QUIET}${DIFF} output/ex31_1.testout ex31.tmp > ex31.dtmp; 22 cat ex31.tmp;\ 24 ${RM} -f ex31.tmp ex31.dtmp;
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | makefile | 13 …-${QUIET}OMPI_MCA_mpi_warn_on_fork=0 ${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex100 -test > ex100.tmp 2>… 14 -${QUIET}${DIFF} output/ex100_1.testout ex100.tmp > ex100.dtmp; 20 cat ex100.tmp;\ 23 ${RM} -f ex100.tmp ex100.dtmp;
|
| /petsc/src/sys/info/ftn-custom/ |
| H A D | zverboseinfof.c | 28 char *c1, *tmp; in petscinfo_() local 31 *ierr = PetscFixSlashN(c1, &tmp); in petscinfo_() 34 *ierr = PetscInfo(NULL, "%s", tmp); in petscinfo_() 36 *ierr = PetscFree(tmp); in petscinfo_()
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex22.c | 7 Mat A11, A12, A21, A22, A, tmp[2][2]; in test_solve() local 57 tmp[0][0] = A11; in test_solve() 58 tmp[0][1] = A12; in test_solve() 59 tmp[1][0] = A21; in test_solve() 60 tmp[1][1] = A22; in test_solve() 62 PetscCall(MatCreateNest(PETSC_COMM_WORLD, 2, NULL, 2, NULL, &tmp[0][0], &A)); in test_solve() 123 Mat tmp[2][2]; in test_solve_matgetvecs() local 167 tmp[0][0] = A11; in test_solve_matgetvecs() 168 tmp[0][1] = A12; in test_solve_matgetvecs() 169 tmp[1][0] = A21; in test_solve_matgetvecs() [all …]
|