| /petsc/src/mat/tests/ |
| H A D | ex101.c | 7 Mat pA, P, aijP; in main() local 27 PetscCall(MatCreate(PETSC_COMM_SELF, &pA)); in main() 28 PetscCall(MatSetSizes(pA, 3, 3, 3, 3)); in main() 29 PetscCall(MatSetType(pA, MATSEQAIJ)); in main() 30 PetscCall(MatSetUp(pA)); in main() 31 PetscCall(MatSetOption(pA, MAT_IGNORE_ZERO_ENTRIES, PETSC_TRUE)); in main() 32 PetscCall(MatSetValues(pA, 3, pij, 3, pij, pa, ADD_VALUES)); in main() 33 PetscCall(MatAssemblyBegin(pA, MAT_FINAL_ASSEMBLY)); in main() 34 PetscCall(MatAssemblyEnd(pA, MAT_FINAL_ASSEMBLY)); in main() 35 PetscCall(MatCreateMAIJ(pA, 3, &P)); in main() [all …]
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex10.c | 61 Mat A, pA; in TestReordering() local 74 PetscCall(DMCreateMatrix(pdm, &pA)); in TestReordering() 76 PetscCall(MatComputeBandwidth(pA, 0.0, &pbw)); in TestReordering() 78 PetscCall(MatViewFromOptions(pA, NULL, "-perm_mat_view")); in TestReordering() 80 PetscCall(MatDestroy(&pA)); in TestReordering() 112 Mat A, pA; in TestReorderingByGroup() local 127 PetscCall(DMCreateMatrix(pdm, &pA)); in TestReorderingByGroup() 129 PetscCall(MatViewFromOptions(pA, NULL, "-perm_mat_view")); in TestReorderingByGroup() 131 PetscCall(MatDestroy(&pA)); in TestReorderingByGroup()
|
| /petsc/src/dm/impls/stag/tutorials/ |
| H A D | ex8.c | 63 static PetscErrorCode AssembleSystem1DVertexCentered(DM dm, Mat *pA, Vec *pb) in AssembleSystem1DVertexCentered() argument 70 PetscCall(DMCreateMatrix(dm, pA)); in AssembleSystem1DVertexCentered() 71 A = *pA; in AssembleSystem1DVertexCentered() 141 PetscErrorCode AssembleSystem(DM dm, Mat *pA, Vec *pb) in AssembleSystem() argument 150 PetscCall(AssembleSystem1DVertexCentered(dm, pA, pb)); in AssembleSystem()
|
| H A D | ex2.c | 145 static PetscErrorCode CreateSystem(DM dmSol, Mat *pA, Vec *pRhs, PetscBool pinPressure) in CreateSystem() argument 165 PetscCall(DMCreateMatrix(dmSol, pA)); in CreateSystem() 166 A = *pA; in CreateSystem()
|
| H A D | ex4.c | 573 static PetscErrorCode CreateSystem2d(SystemParameters parameters, Mat *pA, Vec *pRhs) in CreateSystem2d() argument 596 PetscCall(DMCreateMatrix(dm_main, pA)); in CreateSystem2d() 597 A = *pA; in CreateSystem2d() 991 static PetscErrorCode CreateSystem3d(SystemParameters parameters, Mat *pA, Vec *pRhs) in CreateSystem3d() argument 1014 PetscCall(DMCreateMatrix(dm_main, pA)); in CreateSystem3d() 1015 A = *pA; in CreateSystem3d() 1846 static PetscErrorCode CreateSystem(SystemParameters parameters, Mat *pA, Vec *pRhs) in CreateSystem() argument 1850 PetscCall(CreateSystem2d(parameters, pA, pRhs)); in CreateSystem() 1852 PetscCall(CreateSystem3d(parameters, pA, pRhs)); in CreateSystem()
|
| H A D | ex3.c | 166 static PetscErrorCode CreateSystem(DM dmSol, Mat *pA, Vec *pRhs, PetscBool pinPressure) in CreateSystem() argument 177 PetscCall(DMCreateMatrix(dmSol, pA)); in CreateSystem() 178 A = *pA; in CreateSystem()
|
| /petsc/src/mat/impls/aij/seq/ |
| H A D | matptap.c | 197 MatScalar *aa, *apa, *pa, *pA, *paj, *ca, *caj; in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy() local 216 pA = p->a; in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy() 256 if (cjj[k] == apj[nextap]) caj[k] += (*pA) * apa[apj[nextap++]]; in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy() 259 pA++; in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy()
|
| /petsc/src/dm/impls/stag/tests/ |
| H A D | ex18.c | 248 static PetscErrorCode CreateSystem(DM dm, Mat *pA, Vec *pRhs) in CreateSystem() argument 269 PetscCall(DMCreateMatrix(dm, pA)); in CreateSystem() 270 A = *pA; in CreateSystem()
|
| H A D | ex30.c | 62 static PetscErrorCode CreateMat(DM dmSol, Mat *pA) in CreateMat() argument 74 PetscCall(DMCreateMatrix(dmSol, pA)); in CreateMat() 75 A = *pA; in CreateMat()
|
| /petsc/src/mat/impls/hypre/ |
| H A D | mhypre.c | 189 Mat_MPIAIJ *pA = (Mat_MPIAIJ *)A->data; in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() local 191 PetscInt i, *garray = pA->garray, *jj, cstart, *pjj; in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() 199 pdiag = (Mat_SeqAIJ *)pA->A->data; in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() 200 poffd = (Mat_SeqAIJ *)pA->B->data; in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() 211 PetscCall(PetscArraycpy(hdiag->i, pdiag->i, pA->A->rmap->n + 1)); in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() 213 for (i = 0; i < pA->A->rmap->n + 1; i++) hdiag->i[i] = (HYPRE_Int)pdiag->i[i]; in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() 224 PetscCall(PetscArraycpy(hoffd->i, poffd->i, pA->A->rmap->n + 1)); in MatHYPRE_IJMatrixCopyIJ_MPIAIJ() 226 for (i = 0; i < pA->A->rmap->n + 1; i++) hoffd->i[i] = (HYPRE_Int)poffd->i[i]; in MatHYPRE_IJMatrixCopyIJ_MPIAIJ()
|
| /petsc/src/mat/impls/maij/ |
| H A D | maij.c | 595 const MatScalar *aa = a->a, *pa = p->a, *pA, *paj; in MatPtAPNumeric_SeqAIJ_SeqMAIJ() local 640 pA = pa + poffset; in MatPtAPNumeric_SeqAIJ_SeqMAIJ() 648 if (cjj[k] == apj[nextap]) caj[k] += (*pA) * apa[apj[nextap++]]; in MatPtAPNumeric_SeqAIJ_SeqMAIJ() 651 pA++; in MatPtAPNumeric_SeqAIJ_SeqMAIJ()
|
| /petsc/src/mat/impls/aij/mpi/ |
| H A D | mpimatmatmult.c | 1606 MatScalar **abuf_r, *ba_i, *pA, *coa, *ba; in MatTransposeMatMultNumeric_MPIAIJ_MPIAIJ() local 1654 pA = po->a + po->i[i]; in MatTransposeMatMultNumeric_MPIAIJ_MPIAIJ() 1661 valtmp = pA[j]; in MatTransposeMatMultNumeric_MPIAIJ_MPIAIJ() 1674 pA = pd->a + pd->i[i]; in MatTransposeMatMultNumeric_MPIAIJ_MPIAIJ() 1681 valtmp = pA[j]; in MatTransposeMatMultNumeric_MPIAIJ_MPIAIJ()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexsubmesh.c | 4552 PetscErrorCode DMGetEnclosurePoint(DM dmA, DM dmB, DMEnclosureType etype, PetscInt pB, PetscInt *pA) in DMGetEnclosurePoint() argument 4566 *pA = subpoints[pB]; in DMGetEnclosurePoint() 4574 PetscCall(PetscFindInt(pB, numSubpoints, subpoints, pA)); in DMGetEnclosurePoint() 4575 if (*pA < 0) { in DMGetEnclosurePoint() 4584 *pA = pB; in DMGetEnclosurePoint() 4590 PetscCall(DMGetEnclosurePoint(dmA, dmB, enc, pB, pA)); in DMGetEnclosurePoint()
|