| /petsc/src/mat/tests/ |
| H A D | ex125.c | 108 Mat mats[9] = {NULL, NULL, A, NULL, A, NULL, A, NULL, NULL}; in main() local 115 PetscCall(MatCreateNest(PETSC_COMM_WORLD, 3, NULL, 3, NULL, mats, &B)); in main() 118 Mat mats[4]; in main() local 127 PetscCall(CreateIdentity(m, &mats[0])); in main() 128 PetscCall(CreateRandom(m, n, &mats[1])); in main() 129 mats[3] = A; in main() 136 if (!flg) PetscCall(MatCreateTranspose(mats[1], &mats[2])); in main() 137 else PetscCall(MatTranspose(mats[1], MAT_INITIAL_MATRIX, &mats[2])); in main() 143 PetscCall(MatDuplicate(mats[1], MAT_COPY_VALUES, &B)); in main() 144 PetscCall(MatCreateHermitianTranspose(B, &mats[2])); in main() [all …]
|
| H A D | ex212.c | 7 Mat A, B, C, mats[6]; in main() local 38 mats[0] = A; in main() 39 mats[1] = B; in main() 40 mats[2] = A; in main() 41 mats[3] = NULL; in main() 42 mats[4] = B; in main() 43 mats[5] = A; in main() 44 PetscCall(MatCreateNest(PETSC_COMM_WORLD, 2, NULL, 3, NULL, mats, &C)); in main()
|
| H A D | ex210.c | 7 Mat A, B, C, mats[2]; in main() local 32 mats[0] = A; in main() 33 mats[1] = B; in main() 34 PetscCall(MatCreateNest(PETSC_COMM_WORLD, 1, NULL, 2, NULL, mats, &C)); in main()
|
| H A D | ex269f.F90 | 8 Mat, dimension(4) :: mats 27 mats = [PETSC_NULL_MAT, D, Id, PETSC_NULL_MAT] 28 …PetscCallA(MatCreateNest(PETSC_COMM_WORLD, nb, PETSC_NULL_IS_ARRAY, nb, PETSC_NULL_IS_ARRAY, mats,… 30 PetscCallA(MatNestSetSubMats(A, nb, PETSC_NULL_IS_ARRAY, nb, PETSC_NULL_IS_ARRAY, mats, ierr))
|
| H A D | ex23.c | 13 Mat *mats, *Asub, *Bsub; in main() local 470 PetscCall(PetscMalloc3(nr, &rows, nc, &cols, 2 * nr * nc, &mats)); in main() 473 PetscCall(MatCreateTranspose(A, &mats[i])); in main() 474 PetscCall(MatTranspose(B, MAT_INITIAL_MATRIX, &mats[i + nr * nc])); in main() 476 PetscCall(MatDuplicate(A, MAT_COPY_VALUES, &mats[i])); in main() 477 PetscCall(MatDuplicate(B, MAT_COPY_VALUES, &mats[i + nr * nc])); in main() 482 PetscCall(MatCreateNest(PETSC_COMM_WORLD, nr, rows, nc, cols, mats, &A2)); in main() 483 PetscCall(MatCreateNest(PETSC_COMM_WORLD, nr, rows, nc, cols, mats + nr * nc, &B2)); in main() 486 for (i = 0; i < 2 * nr * nc; i++) PetscCall(MatDestroy(&mats[i])); in main() 487 PetscCall(PetscFree3(rows, cols, mats)); in main()
|
| /petsc/src/ksp/pc/impls/deflation/ |
| H A D | deflation.c | 459 Mat Amat, nextDef = NULL, *mats; in PCSetUp_Deflation() local 500 PetscCall(PetscMalloc1(size, &mats)); in PCSetUp_Deflation() 501 for (i = 0; i < size; i++) PetscCall(MatCompositeGetMat(def->W, i, &mats[i])); in PCSetUp_Deflation() 504 def->W = mats[size]; in PCSetUp_Deflation() 505 PetscCall(PetscObjectReference((PetscObject)mats[size])); in PCSetUp_Deflation() 507 PetscCall(MatCreateComposite(comm, size, mats, &nextDef)); in PCSetUp_Deflation() 510 nextDef = mats[0]; in PCSetUp_Deflation() 511 PetscCall(PetscObjectReference((PetscObject)mats[0])); in PCSetUp_Deflation() 513 PetscCall(PetscFree(mats)); in PCSetUp_Deflation() 521 PetscCall(PetscMalloc1(size, &mats)); in PCSetUp_Deflation() [all …]
|
| /petsc/src/ksp/ksp/tutorials/network/ |
| H A D | ex1_nest.c | 154 Mat **mats; in FormOperator() local 164 PetscCall(MatNestGetSubMats(A, NULL, NULL, &mats)); in FormOperator() 165 e11 = mats[0][0]; /* edges */ in FormOperator() 166 c12 = mats[0][1]; /* couplings */ in FormOperator() 167 c21 = mats[1][0]; /* couplings */ in FormOperator() 168 v22 = mats[1][1]; /* vertices */ in FormOperator()
|
| /petsc/src/snes/tests/ |
| H A D | ex17.c | 551 Mat **mats; in FormJacobian1_block() local 565 PetscCall(MatNestGetSubMats(jac, NULL, NULL, &mats)); in FormJacobian1_block() 566 j11 = mats[0][0]; in FormJacobian1_block() 567 j12 = mats[0][1]; in FormJacobian1_block() 568 j21 = mats[1][0]; in FormJacobian1_block() 569 j22 = mats[1][1]; in FormJacobian1_block()
|
| /petsc/src/dm/impls/composite/ |
| H A D | pack.c | 1431 Mat *mats; in DMCreateInterpolation_Composite() local 1450 PetscCall(PetscCalloc1(nDM * nDM, &mats)); in DMCreateInterpolation_Composite() 1455 if (!v) PetscCall(DMCreateInterpolation(nextc->dm, nextf->dm, &mats[i * nDM + i], NULL)); in DMCreateInterpolation_Composite() 1456 else PetscCall(DMCreateInterpolation(nextc->dm, nextf->dm, &mats[i * nDM + i], &vecs[i])); in DMCreateInterpolation_Composite() 1458 PetscCall(MatCreateNest(PetscObjectComm((PetscObject)fine), nDM, NULL, nDM, NULL, mats, A)); in DMCreateInterpolation_Composite() 1460 for (i = 0; i < nDM * nDM; i++) PetscCall(MatDestroy(&mats[i])); in DMCreateInterpolation_Composite() 1461 PetscCall(PetscFree(mats)); in DMCreateInterpolation_Composite()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | libpetsc4py.pyx | 1289 mats = (PyA, PyB, PyC) 1291 mats = (PyA, PyB, None) 1295 productNumeric(PyC if C == pM else PyB if B == pM else PyA, Mat_(mat), mtypes[mtype], *mats) 1330 mats = (PyA, PyB, PyC) 1332 mats = (PyA, PyB, None) 1336 productSymbolic(PyC if C == pM else PyB if B == pM else PyA, Mat_(mat), mtypes[mtype], *mats) 1370 mats = (PyA, PyB, PyC) 1372 mats = (PyA, PyB, None) 1374 # Find Python matrix in mats able to perform the product 1380 for i in range(len(mats)): [all …]
|
| H A D | Mat.pyx | 1456 mats: Sequence[Sequence[Mat]], 1466 mats 1485 mats = [list(mat) for mat in mats] 1488 assert len(isrows) == len(mats) 1493 assert len(iscols) == len(mats[0]) 1497 cdef Py_ssize_t i, mr = len(mats) 1498 cdef Py_ssize_t j, mc = len(mats[0]) 1508 mat = mats[i][j]
|
| /petsc/src/mat/impls/composite/ |
| H A D | mcomposite.c | 388 PetscErrorCode MatCreateComposite(MPI_Comm comm, PetscInt nmat, const Mat *mats, Mat *mat) in MatCreateComposite() argument 395 for (PetscInt i = 0; i < nmat; i++) PetscCall(MatCompositeAddMat(*mat, mats[i])); in MatCreateComposite()
|
| /petsc/src/mat/impls/aij/mpi/mumps/ |
| H A D | mumps.c | 1514 Mat **mats; in MatConvertToTriples_nest_xaij() local 1519 PetscCall(MatNestGetSubMats(A, &nr, &nc, &mats)); in MatConvertToTriples_nest_xaij() 1533 Mat sub = mats[r][c]; in MatConvertToTriples_nest_xaij() 1602 Mat sub = mats[r][c]; in MatConvertToTriples_nest_xaij() 1616 …for (PetscInt c = 0; c < nc && !sub; ++c) sub = mats[r][c]; // diagonal Mat is NULL, so start over… in MatConvertToTriples_nest_xaij() 1704 Mat sub = mats[r][r]; in MatConvertToTriples_nest_xaij() 1708 …for (PetscInt c = 0; c < nc && !sub; ++c) sub = mats[r][c]; // diagonal Mat is NULL, so start over… in MatConvertToTriples_nest_xaij() 1737 Mat sub = mats[r][c]; in MatConvertToTriples_nest_xaij() 4345 Mat B, **mats; in MatGetFactor_nest_mumps() local 4360 PetscCall(MatNestGetSubMats(A, &nr, &nc, &mats)); in MatGetFactor_nest_mumps() [all …]
|
| /petsc/src/ksp/pc/impls/bddc/ |
| H A D | bddcprivate.c | 5590 Mat *mats, *bdiags; in PCBDDCComputeLocalMatrix() local 5594 PetscCall(PetscCalloc1(nsubs * nsubs, &mats)); in PCBDDCComputeLocalMatrix() 5612 for (PetscInt i = 0; i < nsubs; i++) mats[i * (1 + nsubs)] = bdiags[i]; in PCBDDCComputeLocalMatrix() 5613 …CreateNest(PETSC_COMM_SELF, nsubs, pcbddc->local_subs, nsubs, pcbddc->local_subs, mats, &new_mat)); in PCBDDCComputeLocalMatrix() 5616 PetscCall(PetscFree(mats)); in PCBDDCComputeLocalMatrix()
|