Home
last modified time | relevance | path

Searched refs:preallocator (Results 1 – 10 of 10) sorted by relevance

/petsc/src/mat/tests/
H A Dex230.c7 Mat A, preallocator; in ex1_nonsquare_bs1() local
31 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &preallocator)); in ex1_nonsquare_bs1()
32 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in ex1_nonsquare_bs1()
33 PetscCall(MatSetSizes(preallocator, m, n, M, N)); in ex1_nonsquare_bs1()
34 PetscCall(MatSetBlockSize(preallocator, bs)); in ex1_nonsquare_bs1()
35 PetscCall(MatSetUp(preallocator)); in ex1_nonsquare_bs1()
47 PetscCall(MatSetValues(preallocator, 1, &ii, 1, &jj, &vv, INSERT_VALUES)); in ex1_nonsquare_bs1()
51 PetscCall(MatSetValues(preallocator, 1, &ii, 1, &jj, &vv, INSERT_VALUES)); in ex1_nonsquare_bs1()
55 PetscCall(MatSetValue(preallocator, ii, jj, vv, INSERT_VALUES)); in ex1_nonsquare_bs1()
57 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in ex1_nonsquare_bs1()
[all …]
/petsc/src/ksp/pc/impls/mg/
H A Dgdsw.c219 Mat A, *sA_IG, *sGf, preallocator; in PCMGGDSWCreateCoarseSpace_Private() local
259 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &preallocator)); in PCMGGDSWCreateCoarseSpace_Private()
260 PetscCall(MatSetSizes(preallocator, n, PETSC_DECIDE, PETSC_DECIDE, NG)); in PCMGGDSWCreateCoarseSpace_Private()
261 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in PCMGGDSWCreateCoarseSpace_Private()
262 PetscCall(MatSetUp(preallocator)); in PCMGGDSWCreateCoarseSpace_Private()
273 PetscCall(MatSetValues(preallocator, nri, ri, ncg, cidx + c, NULL, INSERT_VALUES)); in PCMGGDSWCreateCoarseSpace_Private()
274 PetscCall(MatSetValues(preallocator, nrg, rg, ncg, cidx + c, NULL, INSERT_VALUES)); in PCMGGDSWCreateCoarseSpace_Private()
278 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in PCMGGDSWCreateCoarseSpace_Private()
279 PetscCall(MatAssemblyEnd(preallocator, MAT_FINAL_ASSEMBLY)); in PCMGGDSWCreateCoarseSpace_Private()
298 PetscCall(MatPreallocatorPreallocate(preallocator, PETSC_FALSE, *cspace)); in PCMGGDSWCreateCoarseSpace_Private()
[all …]
/petsc/src/mat/utils/
H A Daxpy.c151 Mat preallocator; in MatAXPY_Basic_Preallocate() local
159 PetscCall(MatCreate(PetscObjectComm((PetscObject)Y), &preallocator)); in MatAXPY_Basic_Preallocate()
160 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in MatAXPY_Basic_Preallocate()
161 PetscCall(MatSetLayouts(preallocator, Y->rmap, Y->cmap)); in MatAXPY_Basic_Preallocate()
162 PetscCall(MatSetUp(preallocator)); in MatAXPY_Basic_Preallocate()
163 PetscCall(MatGetOwnershipRange(preallocator, &rstart, &rend)); in MatAXPY_Basic_Preallocate()
170 PetscCall(MatSetValues(preallocator, 1, &r, ncols, row, vals, INSERT_VALUES)); in MatAXPY_Basic_Preallocate()
173 PetscCall(MatSetValues(preallocator, 1, &r, ncols, row, vals, INSERT_VALUES)); in MatAXPY_Basic_Preallocate()
176 PetscCall(MatSetOption(preallocator, MAT_NO_OFF_PROC_ENTRIES, PETSC_TRUE)); in MatAXPY_Basic_Preallocate()
177 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in MatAXPY_Basic_Preallocate()
[all …]
H A Dgcreate.c639 Mat preallocator; in MatSetPreallocationCOO_Basic() local
648 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &preallocator)); in MatSetPreallocationCOO_Basic()
649 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in MatSetPreallocationCOO_Basic()
650 PetscCall(MatSetSizes(preallocator, A->rmap->n, A->cmap->n, A->rmap->N, A->cmap->N)); in MatSetPreallocationCOO_Basic()
651 PetscCall(MatSetLayouts(preallocator, A->rmap, A->cmap)); in MatSetPreallocationCOO_Basic()
652 PetscCall(MatSetUp(preallocator)); in MatSetPreallocationCOO_Basic()
653 …for (PetscCount n = 0; n < ncoo; n++) PetscCall(MatSetValue(preallocator, coo_i[n], coo_j[n], zero… in MatSetPreallocationCOO_Basic()
654 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in MatSetPreallocationCOO_Basic()
655 PetscCall(MatAssemblyEnd(preallocator, MAT_FINAL_ASSEMBLY)); in MatSetPreallocationCOO_Basic()
656 PetscCall(MatPreallocatorPreallocate(preallocator, PETSC_TRUE, A)); in MatSetPreallocationCOO_Basic()
[all …]
/petsc/src/dm/impls/stag/
H A Dstag.c522 Mat preallocator; in DMCreateMatrix_Stag() local
526 PetscCall(MatCreate(PetscObjectComm((PetscObject)dm), &preallocator)); in DMCreateMatrix_Stag()
527 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in DMCreateMatrix_Stag()
529 PetscCall(MatSetSizes(preallocator, m, n, PETSC_DECIDE, PETSC_DECIDE)); in DMCreateMatrix_Stag()
530 PetscCall(MatSetLocalToGlobalMapping(preallocator, ltogmap, ltogmap)); in DMCreateMatrix_Stag()
531 PetscCall(MatSetUp(preallocator)); in DMCreateMatrix_Stag()
534 PetscCall(DMCreateMatrix_Stag_1D_AIJ_Assemble(dm, preallocator)); in DMCreateMatrix_Stag()
537 PetscCall(DMCreateMatrix_Stag_2D_AIJ_Assemble(dm, preallocator)); in DMCreateMatrix_Stag()
540 PetscCall(DMCreateMatrix_Stag_3D_AIJ_Assemble(dm, preallocator)); in DMCreateMatrix_Stag()
545 PetscCall(MatPreallocatorPreallocate(preallocator, fill_with_zeros, *mat)); in DMCreateMatrix_Stag()
[all …]
/petsc/src/mat/impls/sbaij/mpi/
H A Dmpisbaij.c77 Mat preallocator; in MatPreallocateWithMats_Private() local
94 PetscCall(MatCreate(PetscObjectComm((PetscObject)B), &preallocator)); in MatPreallocateWithMats_Private()
95 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in MatPreallocateWithMats_Private()
96 PetscCall(MatSetBlockSize(preallocator, bs)); in MatPreallocateWithMats_Private()
97 PetscCall(MatSetSizes(preallocator, m, n, M, N)); in MatPreallocateWithMats_Private()
98 PetscCall(MatSetUp(preallocator)); in MatPreallocateWithMats_Private()
99 PetscCall(MatGetOwnershipRange(preallocator, &rstart, &rend)); in MatPreallocateWithMats_Private()
107 PetscCall(MatSetValues(preallocator, 1, &r, ncols, row, vals, INSERT_VALUES)); in MatPreallocateWithMats_Private()
108 …if (symm && symm[i]) PetscCall(MatSetValues(preallocator, ncols, row, 1, &r, vals, INSERT_VALUES)); in MatPreallocateWithMats_Private()
112 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in MatPreallocateWithMats_Private()
[all …]
/petsc/src/ksp/pc/impls/patch/
H A Dpcpatch.c1841 Mat preallocator; in PCPatchCreateMatrix_Private() local
1845 PetscCall(MatCreate(PETSC_COMM_SELF, &preallocator)); in PCPatchCreateMatrix_Private()
1846 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in PCPatchCreateMatrix_Private()
1847 PetscCall(MatSetSizes(preallocator, rsize, rsize, rsize, rsize)); in PCPatchCreateMatrix_Private()
1848 PetscCall(MatSetUp(preallocator)); in PCPatchCreateMatrix_Private()
1852 …PetscCall(MatSetValues(preallocator, patch->totalDofsPerCell, idx, patch->totalDofsPerCell, idx, v… in PCPatchCreateMatrix_Private()
1869 …PetscCall(MatSetValues(preallocator, patch->totalDofsPerCell, cell0idx, patch->totalDofsPerCell, c… in PCPatchCreateMatrix_Private()
1870 …PetscCall(MatSetValues(preallocator, patch->totalDofsPerCell, cell1idx, patch->totalDofsPerCell, c… in PCPatchCreateMatrix_Private()
1875 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in PCPatchCreateMatrix_Private()
1876 PetscCall(MatAssemblyEnd(preallocator, MAT_FINAL_ASSEMBLY)); in PCPatchCreateMatrix_Private()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexfem.c3101 Mat preallocator; in DMPlexComputeInterpolatorNested() local
3107 PetscCall(MatCreate(PetscObjectComm((PetscObject)In), &preallocator)); in DMPlexComputeInterpolatorNested()
3108 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in DMPlexComputeInterpolatorNested()
3109 PetscCall(MatSetSizes(preallocator, locRows, locCols, PETSC_DETERMINE, PETSC_DETERMINE)); in DMPlexComputeInterpolatorNested()
3110 PetscCall(MatSetUp(preallocator)); in DMPlexComputeInterpolatorNested()
3116 …PetscCall(MatSetValues(preallocator, rTotDim, cellFIndices, cTotDim, cellCIndices, vals, INSERT_VA… in DMPlexComputeInterpolatorNested()
3118 …obalSection, PETSC_FALSE, dmc, csection, cglobalSection, PETSC_FALSE, preallocator, cell, vals, IN… in DMPlexComputeInterpolatorNested()
3123 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in DMPlexComputeInterpolatorNested()
3124 PetscCall(MatAssemblyEnd(preallocator, MAT_FINAL_ASSEMBLY)); in DMPlexComputeInterpolatorNested()
3125 PetscCall(MatPreallocatorPreallocate(preallocator, PETSC_TRUE, In)); in DMPlexComputeInterpolatorNested()
[all …]
/petsc/src/ksp/ksp/tutorials/output/
H A Dex2_help.out57 … aij>: Matrix type (one of) mpiaijcrl mpiadj seqaij mpibaij composite preallocator mpiaijperm seqs…
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DMat.pyx1001 """Preallocate memory for a matrix using a preallocator matrix.