Lines Matching full:n
3 static PetscErrorCode MatMult_Transpose(Mat N, Vec x, Vec y) in MatMult_Transpose() argument
8 PetscCall(MatShellGetContext(N, &A)); in MatMult_Transpose()
13 static PetscErrorCode MatMultTranspose_Transpose(Mat N, Vec x, Vec y) in MatMultTranspose_Transpose() argument
18 PetscCall(MatShellGetContext(N, &A)); in MatMultTranspose_Transpose()
23 static PetscErrorCode MatSolve_Transpose_LU(Mat N, Vec b, Vec x) in MatSolve_Transpose_LU() argument
28 PetscCall(MatShellGetContext(N, &A)); in MatSolve_Transpose_LU()
33 static PetscErrorCode MatSolveAdd_Transpose_LU(Mat N, Vec b, Vec y, Vec x) in MatSolveAdd_Transpose_LU() argument
38 PetscCall(MatShellGetContext(N, &A)); in MatSolveAdd_Transpose_LU()
43 static PetscErrorCode MatSolveTranspose_Transpose_LU(Mat N, Vec b, Vec x) in MatSolveTranspose_Transpose_LU() argument
48 PetscCall(MatShellGetContext(N, &A)); in MatSolveTranspose_Transpose_LU()
53 static PetscErrorCode MatSolveTransposeAdd_Transpose_LU(Mat N, Vec b, Vec y, Vec x) in MatSolveTransposeAdd_Transpose_LU() argument
58 PetscCall(MatShellGetContext(N, &A)); in MatSolveTransposeAdd_Transpose_LU()
63 static PetscErrorCode MatMatSolve_Transpose_LU(Mat N, Mat B, Mat X) in MatMatSolve_Transpose_LU() argument
68 PetscCall(MatShellGetContext(N, &A)); in MatMatSolve_Transpose_LU()
73 static PetscErrorCode MatMatSolveTranspose_Transpose_LU(Mat N, Mat B, Mat X) in MatMatSolveTranspose_Transpose_LU() argument
78 PetscCall(MatShellGetContext(N, &A)); in MatMatSolveTranspose_Transpose_LU()
83 static PetscErrorCode MatLUFactor_Transpose(Mat N, IS row, IS col, const MatFactorInfo *minfo) in MatLUFactor_Transpose() argument
88 PetscCall(MatShellGetContext(N, &A)); in MatLUFactor_Transpose()
90 PetscCall(MatShellSetOperation(N, MATOP_SOLVE, (PetscErrorCodeFn *)MatSolve_Transpose_LU)); in MatLUFactor_Transpose()
91 PetscCall(MatShellSetOperation(N, MATOP_SOLVE_ADD, (PetscErrorCodeFn *)MatSolveAdd_Transpose_LU)); in MatLUFactor_Transpose()
92 …PetscCall(MatShellSetOperation(N, MATOP_SOLVE_TRANSPOSE, (PetscErrorCodeFn *)MatSolveTranspose_Tra… in MatLUFactor_Transpose()
93 …PetscCall(MatShellSetOperation(N, MATOP_SOLVE_TRANSPOSE_ADD, (PetscErrorCodeFn *)MatSolveTranspose… in MatLUFactor_Transpose()
94 PetscCall(MatShellSetOperation(N, MATOP_MAT_SOLVE, (PetscErrorCodeFn *)MatMatSolve_Transpose_LU)); in MatLUFactor_Transpose()
95 …PetscCall(MatShellSetOperation(N, MATOP_MAT_SOLVE_TRANSPOSE, (PetscErrorCodeFn *)MatMatSolveTransp… in MatLUFactor_Transpose()
99 static PetscErrorCode MatSolve_Transpose_Cholesky(Mat N, Vec b, Vec x) in MatSolve_Transpose_Cholesky() argument
104 PetscCall(MatShellGetContext(N, &A)); in MatSolve_Transpose_Cholesky()
109 static PetscErrorCode MatSolveAdd_Transpose_Cholesky(Mat N, Vec b, Vec y, Vec x) in MatSolveAdd_Transpose_Cholesky() argument
114 PetscCall(MatShellGetContext(N, &A)); in MatSolveAdd_Transpose_Cholesky()
119 static PetscErrorCode MatSolveTranspose_Transpose_Cholesky(Mat N, Vec b, Vec x) in MatSolveTranspose_Transpose_Cholesky() argument
124 PetscCall(MatShellGetContext(N, &A)); in MatSolveTranspose_Transpose_Cholesky()
129 static PetscErrorCode MatSolveTransposeAdd_Transpose_Cholesky(Mat N, Vec b, Vec y, Vec x) in MatSolveTransposeAdd_Transpose_Cholesky() argument
134 PetscCall(MatShellGetContext(N, &A)); in MatSolveTransposeAdd_Transpose_Cholesky()
139 static PetscErrorCode MatMatSolve_Transpose_Cholesky(Mat N, Mat B, Mat X) in MatMatSolve_Transpose_Cholesky() argument
144 PetscCall(MatShellGetContext(N, &A)); in MatMatSolve_Transpose_Cholesky()
149 static PetscErrorCode MatMatSolveTranspose_Transpose_Cholesky(Mat N, Mat B, Mat X) in MatMatSolveTranspose_Transpose_Cholesky() argument
154 PetscCall(MatShellGetContext(N, &A)); in MatMatSolveTranspose_Transpose_Cholesky()
159 static PetscErrorCode MatCholeskyFactor_Transpose(Mat N, IS perm, const MatFactorInfo *minfo) in MatCholeskyFactor_Transpose() argument
164 PetscCall(MatShellGetContext(N, &A)); in MatCholeskyFactor_Transpose()
166 PetscCall(MatShellSetOperation(N, MATOP_SOLVE, (PetscErrorCodeFn *)MatSolve_Transpose_Cholesky)); in MatCholeskyFactor_Transpose()
167 …PetscCall(MatShellSetOperation(N, MATOP_SOLVE_ADD, (PetscErrorCodeFn *)MatSolveAdd_Transpose_Chole… in MatCholeskyFactor_Transpose()
168 …PetscCall(MatShellSetOperation(N, MATOP_SOLVE_TRANSPOSE, (PetscErrorCodeFn *)MatSolveTranspose_Tra… in MatCholeskyFactor_Transpose()
169 …PetscCall(MatShellSetOperation(N, MATOP_SOLVE_TRANSPOSE_ADD, (PetscErrorCodeFn *)MatSolveTranspose… in MatCholeskyFactor_Transpose()
170 …PetscCall(MatShellSetOperation(N, MATOP_MAT_SOLVE, (PetscErrorCodeFn *)MatMatSolve_Transpose_Chole… in MatCholeskyFactor_Transpose()
171 …PetscCall(MatShellSetOperation(N, MATOP_MAT_SOLVE_TRANSPOSE, (PetscErrorCodeFn *)MatMatSolveTransp… in MatCholeskyFactor_Transpose()
175 static PetscErrorCode MatLUFactorNumeric_Transpose(Mat F, Mat N, const MatFactorInfo *info) in MatLUFactorNumeric_Transpose() argument
180 PetscCall(MatShellGetContext(N, &A)); in MatLUFactorNumeric_Transpose()
192 static PetscErrorCode MatLUFactorSymbolic_Transpose(Mat F, Mat N, IS row, IS col, const MatFactorIn… in MatLUFactorSymbolic_Transpose() argument
197 PetscCall(MatShellGetContext(N, &A)); in MatLUFactorSymbolic_Transpose()
204 static PetscErrorCode MatCholeskyFactorNumeric_Transpose(Mat F, Mat N, const MatFactorInfo *info) in MatCholeskyFactorNumeric_Transpose() argument
209 PetscCall(MatShellGetContext(N, &A)); in MatCholeskyFactorNumeric_Transpose()
221 static PetscErrorCode MatCholeskyFactorSymbolic_Transpose(Mat F, Mat N, IS perm, const MatFactorInf… in MatCholeskyFactorSymbolic_Transpose() argument
226 PetscCall(MatShellGetContext(N, &A)); in MatCholeskyFactorSymbolic_Transpose()
233 static PetscErrorCode MatGetFactor_Transpose(Mat N, MatSolverType type, MatFactorType ftype, Mat *F) in MatGetFactor_Transpose() argument
238 PetscCall(MatShellGetContext(N, &A)); in MatGetFactor_Transpose()
245 …} else SETERRQ(PetscObjectComm((PetscObject)N), PETSC_ERR_SUP, "Support for factor type %s not imp… in MatGetFactor_Transpose()
251 static PetscErrorCode MatDestroy_Transpose(Mat N) in MatDestroy_Transpose() argument
256 PetscCall(MatShellGetContext(N, &A)); in MatDestroy_Transpose()
258 PetscCall(PetscObjectComposeFunction((PetscObject)N, "MatTransposeGetMat_C", NULL)); in MatDestroy_Transpose()
259 PetscCall(PetscObjectComposeFunction((PetscObject)N, "MatProductSetFromOptions_anytype_C", NULL)); in MatDestroy_Transpose()
260 PetscCall(PetscObjectComposeFunction((PetscObject)N, "MatShellSetContext_C", NULL)); in MatDestroy_Transpose()
261 PetscCall(PetscObjectComposeFunction((PetscObject)N, "MatFactorGetSolverType_C", NULL)); in MatDestroy_Transpose()
265 static PetscErrorCode MatGetInfo_Transpose(Mat N, MatInfoType flag, MatInfo *info) in MatGetInfo_Transpose() argument
270 PetscCall(MatShellGetContext(N, &A)); in MatGetInfo_Transpose()
275 static PetscErrorCode MatFactorGetSolverType_Transpose(Mat N, MatSolverType *type) in MatFactorGetSolverType_Transpose() argument
280 PetscCall(MatShellGetContext(N, &A)); in MatFactorGetSolverType_Transpose()
285 static PetscErrorCode MatDuplicate_Transpose(Mat N, MatDuplicateOption op, Mat *m) in MatDuplicate_Transpose() argument
290 PetscCall(MatShellGetContext(N, &A)); in MatDuplicate_Transpose()
293 if (op == MAT_COPY_VALUES) PetscCall(MatCopy(N, *m, SAME_NONZERO_PATTERN)); in MatDuplicate_Transpose()
505 static PetscErrorCode MatGetDiagonal_Transpose(Mat N, Vec v) in MatGetDiagonal_Transpose() argument
510 PetscCall(MatShellGetContext(N, &A)); in MatGetDiagonal_Transpose()
526 static PetscErrorCode MatConvert_Transpose(Mat N, MatType newtype, MatReuse reuse, Mat *newmat) in MatConvert_Transpose() argument
533 PetscCall(MatShellGetContext(N, &A)); in MatConvert_Transpose()
535 …if (flg || N->ops->getrow) { /* if this condition is false, MatConvert_Shell() will be called in M… in MatConvert_Transpose()
536 …PetscCall(MatShellGetScalingShifts(N, &vshift, &vscale, (Vec *)MAT_SHELL_NOT_ALLOWED, (Vec *)MAT_S… in MatConvert_Transpose()
547 PetscCall(MatHeaderReplace(N, &B)); in MatConvert_Transpose()
550 flg = (PetscBool)(N->ops->getrow != NULL); in MatConvert_Transpose()
551 PetscCall(MatConvert_Basic(N, newtype, reuse, newmat)); in MatConvert_Transpose()
560 static PetscErrorCode MatTransposeGetMat_Transpose(Mat N, Mat *M) in MatTransposeGetMat_Transpose() argument
563 PetscCall(MatShellGetContext(N, M)); in MatTransposeGetMat_Transpose()
615 . N - the matrix that represents A'
627 PetscErrorCode MatCreateTranspose(Mat A, Mat *N) in MatCreateTranspose() argument
632 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), N)); in MatCreateTranspose()
633 PetscCall(PetscLayoutReference(A->rmap, &((*N)->cmap))); in MatCreateTranspose()
634 PetscCall(PetscLayoutReference(A->cmap, &((*N)->rmap))); in MatCreateTranspose()
635 PetscCall(MatSetType(*N, MATSHELL)); in MatCreateTranspose()
636 PetscCall(MatShellSetContext(*N, A)); in MatCreateTranspose()
639 PetscCall(MatSetBlockSizes(*N, A->cmap->bs, A->rmap->bs)); in MatCreateTranspose()
641 PetscCall(MatSetVecType(*N, vtype)); in MatCreateTranspose()
643 PetscCall(MatBindToCPU(*N, A->boundtocpu)); in MatCreateTranspose()
645 PetscCall(MatSetUp(*N)); in MatCreateTranspose()
647 PetscCall(MatShellSetOperation(*N, MATOP_DESTROY, (PetscErrorCodeFn *)MatDestroy_Transpose)); in MatCreateTranspose()
648 PetscCall(MatShellSetOperation(*N, MATOP_MULT, (PetscErrorCodeFn *)MatMult_Transpose)); in MatCreateTranspose()
649 …PetscCall(MatShellSetOperation(*N, MATOP_MULT_TRANSPOSE, (PetscErrorCodeFn *)MatMultTranspose_Tran… in MatCreateTranspose()
650 PetscCall(MatShellSetOperation(*N, MATOP_LUFACTOR, (PetscErrorCodeFn *)MatLUFactor_Transpose)); in MatCreateTranspose()
651 …PetscCall(MatShellSetOperation(*N, MATOP_CHOLESKYFACTOR, (PetscErrorCodeFn *)MatCholeskyFactor_Tra… in MatCreateTranspose()
652 PetscCall(MatShellSetOperation(*N, MATOP_GET_FACTOR, (PetscErrorCodeFn *)MatGetFactor_Transpose)); in MatCreateTranspose()
653 PetscCall(MatShellSetOperation(*N, MATOP_GETINFO, (PetscErrorCodeFn *)MatGetInfo_Transpose)); in MatCreateTranspose()
654 PetscCall(MatShellSetOperation(*N, MATOP_DUPLICATE, (PetscErrorCodeFn *)MatDuplicate_Transpose)); in MatCreateTranspose()
655 …PetscCall(MatShellSetOperation(*N, MATOP_HAS_OPERATION, (PetscErrorCodeFn *)MatHasOperation_Transp… in MatCreateTranspose()
656 …PetscCall(MatShellSetOperation(*N, MATOP_GET_DIAGONAL, (PetscErrorCodeFn *)MatGetDiagonal_Transpos… in MatCreateTranspose()
657 PetscCall(MatShellSetOperation(*N, MATOP_COPY, (PetscErrorCodeFn *)MatCopy_Transpose)); in MatCreateTranspose()
658 PetscCall(MatShellSetOperation(*N, MATOP_CONVERT, (PetscErrorCodeFn *)MatConvert_Transpose)); in MatCreateTranspose()
660 …PetscCall(PetscObjectComposeFunction((PetscObject)*N, "MatTransposeGetMat_C", MatTransposeGetMat_T… in MatCreateTranspose()
661 …PetscCall(PetscObjectComposeFunction((PetscObject)*N, "MatProductSetFromOptions_anytype_C", MatPro… in MatCreateTranspose()
662 …PetscCall(PetscObjectComposeFunction((PetscObject)*N, "MatFactorGetSolverType_C", MatFactorGetSolv… in MatCreateTranspose()
663 …PetscCall(PetscObjectComposeFunction((PetscObject)*N, "MatShellSetContext_C", MatShellSetContext_I… in MatCreateTranspose()
664 …PetscCall(PetscObjectComposeFunction((PetscObject)*N, "MatShellSetContextDestroy_C", MatShellSetCo… in MatCreateTranspose()
665 …PetscCall(PetscObjectComposeFunction((PetscObject)*N, "MatShellSetManageScalingShifts_C", MatShell… in MatCreateTranspose()
666 PetscCall(PetscObjectChangeTypeName((PetscObject)*N, MATTRANSPOSEVIRTUAL)); in MatCreateTranspose()