Home
last modified time | relevance | path

Searched refs:cMat (Results 1 – 7 of 7) sorted by relevance

/petsc/src/mat/graphops/coarsen/impls/misk/
H A Dmisk.c51 Mat cMat, Prols[5], Rtot; in MatCoarsenApply_MISK_private() local
65 if (misk > 1) PetscCall(MatDuplicate(Gmat, MAT_COPY_VALUES, &cMat)); in MatCoarsenApply_MISK_private()
66 else cMat = Gmat; in MatCoarsenApply_MISK_private()
71 const PetscInt nloc_inner = cMat->rmap->n; in MatCoarsenApply_MISK_private()
80 mpimat = (Mat_MPIAIJ *)cMat->data; in MatCoarsenApply_MISK_private()
84 …CompressedRow(mpimat->B, matB->nonzerorowcnt, &matB->compressedrow, matB->i, cMat->rmap->n, -1.0)); in MatCoarsenApply_MISK_private()
88 matA = (Mat_SeqAIJ *)cMat->data; in MatCoarsenApply_MISK_private()
89 PetscCall(PetscObjectBaseTypeCompare((PetscObject)cMat, MATSEQAIJ, &isAIJ)); in MatCoarsenApply_MISK_private()
92 PetscCall(MatGetOwnershipRange(cMat, &my0, &Iend)); in MatCoarsenApply_MISK_private()
100 PetscCall(PetscSFCreate(PetscObjectComm((PetscObject)cMat), &sf)); in MatCoarsenApply_MISK_private()
[all …]
/petsc/src/mat/graphops/coarsen/impls/hem/
H A Dhem.c429 Mat cMat, tMat, P; in MatCoarsenApply_HEM_private() local
448 PetscCall(MatDuplicate(a_Gmat, MAT_COPY_VALUES, &cMat)); in MatCoarsenApply_HEM_private()
449 PetscCall(MatConvert(cMat, MATAIJ, MAT_INPLACE_MATRIX, &cMat)); in MatCoarsenApply_HEM_private()
468 mpimat = (Mat_MPIAIJ *)cMat->data; in MatCoarsenApply_HEM_private()
481 matA = (Mat_SeqAIJ *)cMat->data; in MatCoarsenApply_HEM_private()
490 PetscCall(MatCreateVecs(cMat, &locMaxEdge, NULL)); in MatCoarsenApply_HEM_private()
491 PetscCall(MatCreateVecs(cMat, &locMaxPE, NULL)); in MatCoarsenApply_HEM_private()
498 PetscCall(MatCreateVecs(cMat, &vec, NULL)); in MatCoarsenApply_HEM_private()
1088 PetscCall(MatPtAP(cMat, P, MAT_INITIAL_MATRIX, 1.0, &tMat)); in MatCoarsenApply_HEM_private()
1090 PetscCall(MatDestroy(&cMat)); in MatCoarsenApply_HEM_private()
[all …]
/petsc/src/dm/impls/plex/
H A Dplextree.c1140 …ode DMPlexComputeAnchorMatrix_Tree_Direct(DM dm, PetscSection section, PetscSection cSec, Mat cMat) in DMPlexComputeAnchorMatrix_Tree_Direct() argument
1362 … PetscCall(MatSetValues(cMat, nWork, workIndRow, nWorkP, workIndCol, scwork, INSERT_VALUES)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1380 PetscCall(MatAssemblyBegin(cMat, MAT_FINAL_ASSEMBLY)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1381 PetscCall(MatAssemblyEnd(cMat, MAT_FINAL_ASSEMBLY)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1541 …xComputeAnchorMatrix_Tree_FromReference(DM dm, PetscSection section, PetscSection conSec, Mat cMat) in DMPlexComputeAnchorMatrix_Tree_FromReference() argument
1622 PetscCall(MatGetRowIJ(cMat, 0, PETSC_FALSE, PETSC_FALSE, &nRows, &ia, &ja, &done)); in DMPlexComputeAnchorMatrix_Tree_FromReference()
1623 …PetscCheck(done, PetscObjectComm((PetscObject)cMat), PETSC_ERR_PLIB, "Could not get RowIJ of const… in DMPlexComputeAnchorMatrix_Tree_FromReference()
1743 …for (row = 0; row < nRows; row++) PetscCall(MatSetValues(cMat, 1, &row, ia[row + 1] - ia[row], &ja… in DMPlexComputeAnchorMatrix_Tree_FromReference()
1744 PetscCall(MatRestoreRowIJ(cMat, 0, PETSC_FALSE, PETSC_FALSE, &nRows, &ia, &ja, &done)); in DMPlexComputeAnchorMatrix_Tree_FromReference()
1745 …PetscCheck(done, PetscObjectComm((PetscObject)cMat), PETSC_ERR_PLIB, "Could not restore RowIJ of c… in DMPlexComputeAnchorMatrix_Tree_FromReference()
[all …]
H A Dplex.c7840 Mat cMat; in DMPlexAnchorsGetSubMatModification() local
7949 PetscCall(DMGetDefaultConstraints(dm, &cSec, &cMat, NULL)); in DMPlexAnchorsGetSubMatModification()
8032 PetscCall(MatGetValues(cMat, bSecDof, &indices[o], aDof, &newIndices[oNew], tmpMat)); in DMPlexAnchorsGetSubMatModification()
10713 …ode DMPlexCreateConstraintMatrix_Anchors(DM dm, PetscSection section, PetscSection cSec, Mat *cMat) in DMPlexCreateConstraintMatrix_Anchors() argument
10727 PetscCall(MatCreate(PETSC_COMM_SELF, cMat)); in DMPlexCreateConstraintMatrix_Anchors()
10728 PetscCall(MatSetSizes(*cMat, m, n, m, n)); in DMPlexCreateConstraintMatrix_Anchors()
10736 PetscCall(MatSetType(*cMat, mtype)); in DMPlexCreateConstraintMatrix_Anchors()
10818 PetscCall(MatSeqAIJSetPreallocationCSR(*cMat, i, j, NULL)); in DMPlexCreateConstraintMatrix_Anchors()
10829 Mat cMat; in DMCreateDefaultConstraints_Plex() local
10839 PetscCall(DMPlexCreateConstraintMatrix_Anchors(dm, section, cSec, &cMat)); in DMCreateDefaultConstraints_Plex()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex3.c458 Mat cMat, mass; in SetupSection() local
465 PetscCall(DMGetDefaultConstraints(dm, &cSec, &cMat, NULL)); in SetupSection()
494 … for (j = 0; j < cDof; j++) PetscCall(MatSetValue(cMat, cOff + j, aOff + j, 1., INSERT_VALUES)); in SetupSection()
497 PetscCall(MatAssemblyBegin(cMat, MAT_FINAL_ASSEMBLY)); in SetupSection()
498 PetscCall(MatAssemblyEnd(cMat, MAT_FINAL_ASSEMBLY)); in SetupSection()
/petsc/src/dm/interface/
H A Ddm.c2796 Mat cMat; in DMGlobalToLocalHook_Constraints() local
2805 PetscCall(DMGetDefaultConstraints(dm, &cSec, &cMat, &cBias)); in DMGlobalToLocalHook_Constraints()
2806 if (cMat && (mode == INSERT_VALUES || mode == INSERT_ALL_VALUES || mode == INSERT_BC_VALUES)) { in DMGlobalToLocalHook_Constraints()
2809 PetscCall(MatGetSize(cMat, &nRows, NULL)); in DMGlobalToLocalHook_Constraints()
2812 PetscCall(MatCreateVecs(cMat, NULL, &cVec)); in DMGlobalToLocalHook_Constraints()
2813 PetscCall(MatMult(cMat, l, cVec)); in DMGlobalToLocalHook_Constraints()
3014 Mat cMat; in DMLocalToGlobalHook_Constraints() local
3020 PetscCall(DMGetDefaultConstraints(dm, &cSec, &cMat, NULL)); in DMLocalToGlobalHook_Constraints()
3021 if (!cMat) PetscFunctionReturn(PETSC_SUCCESS); in DMLocalToGlobalHook_Constraints()
3023 PetscCall(MatGetSize(cMat, &nRows, NULL)); in DMLocalToGlobalHook_Constraints()
[all …]
/petsc/src/ksp/ksp/utils/dm/
H A Ddmproject.c210 Mat cMat; in DMProjectField() local
212 PetscCall(DMGetDefaultConstraints(dm, NULL, &cMat, NULL)); in DMProjectField()
213 if (cMat) PetscCall(DMGlobalToLocalSolve(dm, localX, X)); in DMProjectField()