Lines Matching refs:preallocator

7   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()
58 PetscCall(MatAssemblyEnd(preallocator, MAT_FINAL_ASSEMBLY)); in ex1_nonsquare_bs1()
65 PetscCall(MatPreallocatorPreallocate(preallocator, PETSC_TRUE, A)); in ex1_nonsquare_bs1()
70 PetscCall(MatDestroy(&preallocator)); in ex1_nonsquare_bs1()
107 Mat A, preallocator; in ex2_square_bsvariable() local
133 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), &preallocator)); in ex2_square_bsvariable()
134 PetscCall(MatSetType(preallocator, MATPREALLOCATOR)); in ex2_square_bsvariable()
135 PetscCall(MatSetSizes(preallocator, m, n, M, N)); in ex2_square_bsvariable()
136 PetscCall(MatSetBlockSize(preallocator, bs)); in ex2_square_bsvariable()
137 PetscCall(MatSetUp(preallocator)); in ex2_square_bsvariable()
151 PetscCall(MatSetValue(preallocator, ii, jj, vv[0], INSERT_VALUES)); in ex2_square_bsvariable()
155 PetscCall(MatSetValuesBlocked(preallocator, 1, &ii, 1, &jj, vv, INSERT_VALUES)); in ex2_square_bsvariable()
159 PetscCall(MatSetValuesBlocked(preallocator, 1, &ii, 1, &jj, vv, INSERT_VALUES)); in ex2_square_bsvariable()
163 PetscCall(MatSetValuesBlocked(preallocator, 1, &ii, 1, &jj, vv, INSERT_VALUES)); in ex2_square_bsvariable()
167 PetscCall(MatSetValuesBlocked(preallocator, 1, &ii, 1, &jj, vv, INSERT_VALUES)); in ex2_square_bsvariable()
171 PetscCall(MatSetValuesBlocked(preallocator, 1, &ii, 1, &jj, vv, INSERT_VALUES)); in ex2_square_bsvariable()
175 PetscCall(MatAssemblyBegin(preallocator, MAT_FINAL_ASSEMBLY)); in ex2_square_bsvariable()
176 PetscCall(MatAssemblyEnd(preallocator, MAT_FINAL_ASSEMBLY)); in ex2_square_bsvariable()
183 PetscCall(MatPreallocatorPreallocate(preallocator, PETSC_TRUE, A)); in ex2_square_bsvariable()
188 PetscCall(MatDestroy(&preallocator)); in ex2_square_bsvariable()