| /petsc/src/mat/tutorials/ |
| H A D | ex9.c | 18 PetscInt nmat = 3; /* number of matrices */ in main() local 27 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nmat", &nmat, NULL)); in main() 32 PetscCall(PetscMalloc1(nmat + 3, &A)); in main() 35 …for (i = 1; i < nmat + 1; i++) PetscCall(MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE… in main() 36 …CreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, n / 2, n, 3, NULL, 3, NULL, &A[nmat + 1])); in main() 37 for (i = 0; i < nmat + 2; i++) PetscCall(MatSetRandom(A[i], rctx)); in main() 51 for (i = 2; i < nmat + 1; i++) { in main() 58 PetscCall(MatCreateComposite(PETSC_COMM_WORLD, nmat, A + 1, &B)); in main() 85 for (i = 1; i < nmat; i++) { in main() 92 PetscCall(MatCreateComposite(PETSC_COMM_WORLD, nmat, A, &B)); in main() [all …]
|
| /petsc/src/mat/impls/composite/ |
| H A D | mcomposite.c | 16 PetscInt nmat; member 50 for (i = 0; i < shell->nmat; i++) PetscCall(VecDestroy(&shell->lvecs[i])); in MatDestroy_Composite() 95 for (PetscInt i = 0; i < shell->nmat; i++) scale *= shell->scalings[i]; in MatMult_Composite_Multiplicative() 123 for (PetscInt i = 0; i < shell->nmat; i++) scale *= shell->scalings[i]; in MatMultTranspose_Composite_Multiplicative() 167 PetscCall(PetscMalloc3(tot, &shell->location, tot, &shell->larray, shell->nmat, &shell->lvecs)); in MatMult_Composite() 388 PetscErrorCode MatCreateComposite(MPI_Comm comm, PetscInt nmat, const Mat *mats, Mat *mat) in MatCreateComposite() argument 391 …PetscCheck(nmat >= 1, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Must pass in at least one matrix… in MatCreateComposite() 395 for (PetscInt i = 0; i < nmat; i++) PetscCall(MatCompositeAddMat(*mat, mats[i])); in MatCreateComposite() 423 shell->nmat += 1; in MatCompositeAddMat_Composite() 428 if (shell->nmat == 1) PetscCall(MatSetVecType(mat, vtype_smat)); in MatCompositeAddMat_Composite() [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex75.c | 13 PetscInt i, j, nmat = 10; in main() local 22 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nmat", &nmat, NULL)); in main() 27 for (i = 0; i < nmat; i++) { in main()
|
| H A D | ex75f.F90 | 15 PetscInt i, j, nmat 26 PetscCallA(PetscOptionsGetInt(PETSC_NULL_OPTIONS, PETSC_NULL_CHARACTER, '-nmat', nmat, flg, ierr)) 32 do i = 0, nmat - 1
|
| /petsc/src/mat/tests/ |
| H A D | bench_spmv.c | 39 …nputjsonfile, char ***outputfilenames, char ***outputgroupnames, char ***outputmatnames, int *nmat) in ParseJSON() argument 51 *nmat = n; in ParseJSON() 259 PetscInt nmat = 1, nformats = 5, i, j, repetitions = 1; in main() local 297 ParseJSON(jfilename, &filenames, &groupnames, &matnames, &nmat); in main() 298 PetscCall(PetscCalloc1(nmat, &spmv_times)); in main() 332 for (i = 0; i < nmat; i++) { in main() 346 starting_spmv_time = spmv_times[nmat - 1]; in main() 360 for (i = 0; i < nmat; i++) { in main()
|
| /petsc/src/mat/graphops/order/ |
| H A D | sorder.c | 151 PetscInt mmat, nmat, mis; in MatGetOrdering() local 209 PetscCall(MatGetLocalSize(mat, &mmat, &nmat)); in MatGetOrdering() 210 …heck(mmat == nmat, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Must be square matrix, rows %" PetscInt_… in MatGetOrdering()
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_dmshell.py | 69 nmat = self.dm.createMatrix() 70 self.assertEqual(nmat.getSizes(), mat.getSizes()) 80 nmat = self.dm.createMatrix() 81 self.assertEqual(nmat.getSizes(), create_mat(self.dm).getSizes())
|