Home
last modified time | relevance | path

Searched refs:submat (Results 1 – 25 of 25) sorted by relevance

/petsc/src/mat/tests/
H A Dex4.c7 Mat mat, submat, submat1, *submatrices; in main() local
41 submat = *submatrices; in main()
47 PetscCall(MatView(submat, sviewer)); in main()
54 PetscCall(PetscObjectReference((PetscObject)submat)); in main()
56 PetscCall(MatDestroy(&submat)); in main()
63 submat = *submatrices; in main()
71 PetscCall(MatView(submat, sviewer)); in main()
73 PetscCall(PetscObjectReference((PetscObject)submat)); in main()
75 PetscCall(MatDestroy(&submat)); in main()
82 submat = *submatrices; in main()
[all …]
H A Dex212.c51 Mat submat; in main() local
55 PetscCall(MatCreateSubMatrix(C, rows[i], NULL, MAT_INITIAL_MATRIX, &submat)); in main()
56 PetscCall(MatView(submat, NULL)); in main()
57 PetscCall(MatNestGetISs(submat, NULL, cols)); in main()
59 PetscCall(MatDestroy(&submat)); in main()
H A Dex221.c73 PetscBool randomize = PETSC_FALSE, submat = PETSC_FALSE; in main() local
90 PetscCall(PetscOptionsGetBool(NULL, NULL, "-submat", &submat, NULL)); in main()
136 if (submat) { in main()
/petsc/src/ksp/ksp/tutorials/
H A Dex85.c25 Mat submat[4]; in main() local
53 PetscCall(MatCreate(PETSC_COMM_WORLD, &submat[0])); in main()
54 PetscCall(MatSetSizes(submat[0], 3, 3, PETSC_DETERMINE, PETSC_DETERMINE)); in main()
55 PetscCall(MatSetType(submat[0], MATAIJ)); in main()
56 PetscCall(MatSetLocalToGlobalMapping(submat[0], rowMapA, colMapA)); in main()
57 PetscCall(MatCreate(PETSC_COMM_WORLD, &submat[1])); in main()
58 PetscCall(MatSetSizes(submat[1], 3, 2, PETSC_DETERMINE, PETSC_DETERMINE)); in main()
59 PetscCall(MatSetType(submat[1], MATAIJ)); in main()
60 PetscCall(MatSetLocalToGlobalMapping(submat[1], rowMapA, colMapD)); in main()
61 PetscCall(MatCreate(PETSC_COMM_WORLD, &submat[2])); in main()
[all …]
/petsc/src/mat/impls/aij/mpi/
H A Dmpiov.c1216 Mat submat, A = c->A, B = c->B; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local() local
1599 PetscCall(MatCreate(PETSC_COMM_SELF, &submat)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1600 PetscCall(MatSetSizes(submat, nrow, ncol, PETSC_DETERMINE, PETSC_DETERMINE)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1604 if (ib > 1 || jb > 1) PetscCall(MatSetBlockSizes(submat, ib, jb)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1605 PetscCall(MatSetType(submat, ((PetscObject)A)->type_name)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1606 PetscCall(MatSeqAIJSetPreallocation(submat, 0, lens)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1610 subc = (Mat_SeqAIJ *)submat->data; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1641 smatis1->destroy = submat->ops->destroy; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1642 submat->ops->destroy = MatDestroySubMatrix_SeqAIJ; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1643 submat->factortype = C->factortype; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
[all …]
H A Dmpiaij.c3243 …e MatCreateSubMatrix_MPIAIJ_SameRowColDist(Mat mat, IS isrow, IS iscol, MatReuse call, Mat *submat) in MatCreateSubMatrix_MPIAIJ_SameRowColDist() argument
3257 PetscCall(PetscObjectQuery((PetscObject)*submat, "isrow_d", (PetscObject *)&isrow_d)); in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
3260 PetscCall(PetscObjectQuery((PetscObject)*submat, "iscol_d", (PetscObject *)&iscol_d)); in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
3263 PetscCall(PetscObjectQuery((PetscObject)*submat, "iscol_o", (PetscObject *)&iscol_o)); in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
3267 asub = (Mat_MPIAIJ *)(*submat)->data; in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
3271 PetscCall(MatAssemblyBegin(*submat, MAT_FINAL_ASSEMBLY)); in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
3272 PetscCall(MatAssemblyEnd(*submat, MAT_FINAL_ASSEMBLY)); in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
3324 *submat = M; in MatCreateSubMatrix_MPIAIJ_SameRowColDist()
/petsc/src/mat/impls/normal/
H A Dnormmh.c9 …rmalHermitian(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_NormalHermitian() argument
22 if (scall != MAT_REUSE_MATRIX) PetscCall(PetscCalloc1(n, submat)); in MatCreateSubMatrices_NormalHermitian()
30 PetscCall(MatCreateNormalHermitian(suba[M], *submat + M)); in MatCreateSubMatrices_NormalHermitian()
31 PetscCall(MatShift((*submat)[M], shift)); in MatCreateSubMatrices_NormalHermitian()
32 PetscCall(MatScale((*submat)[M], scale)); in MatCreateSubMatrices_NormalHermitian()
H A Dnormm.c26 …trices_Normal(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_Normal() argument
39 if (scall != MAT_REUSE_MATRIX) PetscCall(PetscCalloc1(n, submat)); in MatCreateSubMatrices_Normal()
47 PetscCall(MatCreateNormal(suba[M], *submat + M)); in MatCreateSubMatrices_Normal()
48 PetscCall(MatShift((*submat)[M], shift)); in MatCreateSubMatrices_Normal()
49 PetscCall(MatScale((*submat)[M], scale)); in MatCreateSubMatrices_Normal()
/petsc/src/ksp/pc/impls/hmg/
H A Dhmg.c16 static PetscErrorCode PCHMGExtractSubMatrix_Private(Mat pmat, Mat *submat, MatReuse reuse, PetscInt… in PCHMGExtractSubMatrix_Private() argument
28 PetscCall(MatCreateSubMatrix(pmat, isrow, isrow, reuse, submat)); in PCHMGExtractSubMatrix_Private()
92 Mat PA, submat; in PCSetUp_HMG() local
141 …PetscCall(PCHMGExtractSubMatrix_Private(PA, &submat, MAT_INITIAL_MATRIX, hmg->component, blocksize… in PCSetUp_HMG()
142 PA = submat; in PCSetUp_HMG()
/petsc/src/ksp/ksp/tests/
H A Dex10.c89 Mat mat, submat = 0, *submatb; in GetElasticityMatrix() local
150 submat = *submatb; in GetElasticityMatrix()
159 PetscCall(MatConvert(submat, type, MAT_INITIAL_MATRIX, newmat)); in GetElasticityMatrix()
160 PetscCall(MatDestroy(&submat)); in GetElasticityMatrix()
/petsc/src/mat/impls/adj/mpi/
H A Dmpiadj.c133 …at, PetscInt n, const IS irow[], const IS icol[], PetscBool subcomm, MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_MPIAdj_Private() argument
190 PetscCall(MatCreateMPIAdj(scomm_row, irow_n, icol_n, sxadj, sadjncy, svalues, submat[i])); in MatCreateSubMatrices_MPIAdj_Private()
192 Mat sadj = *submat[i]; in MatCreateSubMatrices_MPIAdj_Private()
209 …cesMPI_MPIAdj(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatricesMPI_MPIAdj() argument
213 PetscCall(MatCreateSubMatrices_MPIAdj_Private(mat, n, irow, icol, PETSC_TRUE, scall, submat)); in MatCreateSubMatricesMPI_MPIAdj()
217 …trices_MPIAdj(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_MPIAdj() argument
221 PetscCall(MatCreateSubMatrices_MPIAdj_Private(mat, n, irow, icol, PETSC_FALSE, scall, submat)); in MatCreateSubMatrices_MPIAdj()
/petsc/src/mat/impls/dense/mpi/
H A Dmmdense.c25 …_MPIDense(Mat C, PetscInt ismax, const IS isrow[], const IS iscol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_MPIDense() argument
31 if (scall != MAT_REUSE_MATRIX) PetscCall(PetscCalloc1(ismax + 1, submat)); in MatCreateSubMatrices_MPIDense()
44 …ll(MatCreateSubMatrices_MPIDense_Local(C, max_no, isrow + pos, iscol + pos, scall, *submat + pos)); in MatCreateSubMatrices_MPIDense()
/petsc/src/mat/impls/htool/
H A Dhtool.cxx158 …bMatrices_Htool(Mat A, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_Htool() argument
171 if (scall != MAT_REUSE_MATRIX) PetscCall(PetscCalloc1(n, submat)); in MatCreateSubMatrices_Htool()
177 …REUSE_MATRIX) PetscCall(MatCreateDense(PETSC_COMM_SELF, nrow, m, nrow, m, nullptr, (*submat) + i)); in MatCreateSubMatrices_Htool()
178 PetscCall(MatDenseGetArrayWrite((*submat)[i], &ptr)); in MatCreateSubMatrices_Htool()
253 PetscCall(MatDenseRestoreArrayWrite((*submat)[i], &ptr)); in MatCreateSubMatrices_Htool()
254 PetscCall(MatShift((*submat)[i], shift)); in MatCreateSubMatrices_Htool()
255 PetscCall(MatScale((*submat)[i], scale)); in MatCreateSubMatrices_Htool()
/petsc/src/mat/impls/cdiagonal/
H A Dcdiagonal.c88 …onstantDiagonal(Mat A, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_ConstantDiagonal() argument
94 PetscCall(MatCreateSubMatrices(B, n, irow, icol, scall, submat)); in MatCreateSubMatrices_ConstantDiagonal()
/petsc/src/mat/impls/baij/mpi/
H A Dbaijov.c524 …s_MPIBAIJ(Mat C, PetscInt ismax, const IS isrow[], const IS iscol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_MPIBAIJ() argument
570 PetscCall(PetscCalloc1(ismax + nstages, submat)); in MatCreateSubMatrices_MPIBAIJ()
573 subc = (Mat_SeqBAIJ *)((*submat)[0]->data); in MatCreateSubMatrices_MPIBAIJ()
576 smat = (Mat_SubSppt *)(*submat)[0]->data; in MatCreateSubMatrices_MPIBAIJ()
587 …atrices_MPIBAIJ_local(C, max_no, isrow_block + pos, iscol_block + pos, scall, *submat + pos, sym)); in MatCreateSubMatrices_MPIBAIJ()
590 smat = (Mat_SubSppt *)(*submat)[pos]->data; in MatCreateSubMatrices_MPIBAIJ()
599 subc = (Mat_SeqBAIJ *)((*submat)[0]->data); in MatCreateSubMatrices_MPIBAIJ()
/petsc/src/mat/interface/
H A Dmatrix.c7258 …teSubMatrices(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices() argument
7272 PetscAssertPointer(submat, 6); in MatCreateSubMatrices()
7274 PetscAssertPointer(*submat, 6); in MatCreateSubMatrices()
7275 for (i = 0; i < n; i++) PetscValidHeaderSpecific((*submat)[i], MAT_CLASSID, 6); in MatCreateSubMatrices()
7281 PetscUseTypeMethod(mat, createsubmatrices, n, irow, icol, scall, submat); in MatCreateSubMatrices()
7284 …(*submat)[i]->factortype = MAT_FACTOR_NONE; /* in case in place factorization was previously done … in MatCreateSubMatrices()
7286 if (eq) PetscCall(MatPropagateSymmetryOptions(mat, (*submat)[i])); in MatCreateSubMatrices()
7289 PetscCall(MatBindToCPU((*submat)[i], PETSC_TRUE)); in MatCreateSubMatrices()
7290 PetscCall(MatSetBindingPropagates((*submat)[i], PETSC_TRUE)); in MatCreateSubMatrices()
7319 …ubMatricesMPI(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatricesMPI() argument
[all …]
/petsc/src/mat/impls/is/
H A Dmatis.c3242 static PetscErrorCode MatGetLocalSubMatrix_IS(Mat A, IS row, IS col, Mat *submat) in MatGetLocalSubMatrix_IS() argument
3304 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), submat)); in MatGetLocalSubMatrix_IS()
3305 PetscCall(MatSetSizes(*submat, PETSC_DECIDE, PETSC_DECIDE, M, N)); in MatGetLocalSubMatrix_IS()
3306 PetscCall(MatSetType(*submat, MATIS)); in MatGetLocalSubMatrix_IS()
3307 matis = (Mat_IS *)((*submat)->data); in MatGetLocalSubMatrix_IS()
3309 PetscCall(MatSetLocalToGlobalMapping(*submat, rl2g, cl2g)); in MatGetLocalSubMatrix_IS()
3311 PetscCall(MatISSetLocalMat(*submat, lA)); in MatGetLocalSubMatrix_IS()
3316 PetscCall(PetscMemzero((*submat)->ops, sizeof(struct _MatOps))); in MatGetLocalSubMatrix_IS()
3317 (*submat)->ops->destroy = MatDestroy_IS; in MatGetLocalSubMatrix_IS()
3318 (*submat)->ops->setvalueslocal = MatSetValuesLocal_SubMat_IS; in MatGetLocalSubMatrix_IS()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DMat.pyx3996 cdef Mat submat = Mat()
3997 CHKERR(MatGetDiagonalBlock(self.mat, &submat.mat))
3998 CHKERR(PetscINCREF(submat.obj))
3999 return submat
4014 def createSubMatrix(self, IS isrow, IS iscol=None, Mat submat=None) -> Mat: argument
4025 submat
4038 if submat is None: submat = Mat()
4039 if submat.mat != NULL: reuse = MAT_REUSE_MATRIX
4041 reuse, &submat.mat))
4042 return submat
[all …]
/petsc/doc/manual/
H A Dmat.md775 MatGetLocalSubMatrix(Mat A,IS isrow,IS iscol,Mat *submat);
778 which provides a “view” `submat` into a matrix `A` that operates in
779 the monolithic global space. The `submat` transforms from the split
782 space that `submat` should operate in. If a nested matrix format is
784 it without making any copies. In this case, `submat` is fully
790 `MatSetValuesBlockedLocal()`. Note that although `submat` may not be
/petsc/include/
H A Dpetscmat.h873 …etSubMatrices(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatGetSubMatrices() argument
875 return MatCreateSubMatrices(mat, n, irow, icol, scall, submat); in MatGetSubMatrices()
878 …ubMatricesMPI(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatGetSubMatricesMPI() argument
880 return MatCreateSubMatricesMPI(mat, n, irow, icol, scall, submat); in MatGetSubMatricesMPI()
H A Dpetscpc.h106 …ifySubMatricesFn(PC pc, PetscInt nsub, const IS row[], const IS col[], Mat submat[], PetscCtx ctx);
/petsc/src/ksp/pc/interface/
H A Dprecon.c1228 PetscErrorCode PCModifySubMatrices(PC pc, PetscInt nsub, const IS row[], const IS col[], Mat submat in PCModifySubMatrices() argument
1234 PetscCall((*pc->modifysubmatrices)(pc, nsub, row, col, submat, ctx)); in PCModifySubMatrices()
/petsc/src/mat/impls/maij/
H A Dmaij.c995 …Matrices_MAIJ(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, Mat *submat[]) in MatCreateSubMatrices_MAIJ() argument
1001 PetscCall(MatCreateSubMatrices(A, n, irow, icol, scall, submat)); in MatCreateSubMatrices_MAIJ()
/petsc/src/ksp/pc/impls/hpddm/
H A Dpchpddm.cxx1268 …eateSubMatrices_Private(Mat mat, PetscInt n, const IS *, const IS *, MatReuse scall, Mat *submat[]) in PCHPDDMCreateSubMatrices_Private() argument
1280 …PetscCall(PetscCalloc1(2, submat)); /* allocate an extra Mat to avoid errors in MatDestroySubMatri… in PCHPDDMCreateSubMatrices_Private()
1281 if (!flg) PetscCall(MatDuplicate(A, MAT_COPY_VALUES, *submat)); in PCHPDDMCreateSubMatrices_Private()
1282 } else if (!flg) PetscCall(MatCopy(A, (*submat)[0], SAME_NONZERO_PATTERN)); in PCHPDDMCreateSubMatrices_Private()
1284 PetscCall(MatDestroy(*submat)); /* previously created Mat has to be destroyed */ in PCHPDDMCreateSubMatrices_Private()
1285 (*submat)[0] = A; in PCHPDDMCreateSubMatrices_Private()
/petsc/systems/Apple/iOS/PETSc/PETSc.xcodeproj/
H A Dproject.pbxproj140 …D89D1D05207AA1AB00FACC19 /* submat.c in Sources */ = {isa = PBXBuildFile; fileRef = D89D1A1D207AA1…
892 …A1D207AA1A900FACC19 /* submat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType …
1663 D89D1A1D207AA1A900FACC19 /* submat.c */,
3070 D89D1D05207AA1AB00FACC19 /* submat.c in Sources */,