Lines Matching refs:B
5 static PetscErrorCode MatMPISELLSetPreallocation_MPISELLHIP(Mat B, PetscInt d_rlenmax, const PetscInt d_rlen[], PetscInt o_rlenmax, const PetscInt o_rlen[])
7 Mat_MPISELL *b = (Mat_MPISELL *)B->data;
10 PetscCall(PetscLayoutSetUp(B->rmap));
11 PetscCall(PetscLayoutSetUp(B->cmap));
13 if (!B->preallocated) {
16 PetscCall(MatBindToCPU(b->A, B->boundtocpu));
17 PetscCall(MatSetSizes(b->A, B->rmap->n, B->cmap->n, B->rmap->n, B->cmap->n));
19 PetscCall(MatCreate(PETSC_COMM_SELF, &b->B));
20 PetscCall(MatBindToCPU(b->B, B->boundtocpu));
21 PetscCall(MatSetSizes(b->B, B->rmap->n, B->cmap->N, B->rmap->n, B->cmap->N));
22 PetscCall(MatSetType(b->B, MATSEQSELLHIP));
25 PetscCall(MatSeqSELLSetPreallocation(b->B, o_rlenmax, o_rlen));
26 B->preallocated = PETSC_TRUE;
27 B->was_assembled = PETSC_FALSE;
28 B->assembled = PETSC_FALSE;
53 PETSC_INTERN PetscErrorCode MatConvert_MPISELL_MPISELLHIP(Mat B, MatType, MatReuse reuse, Mat *newmat)
60 if (reuse == MAT_INITIAL_MATRIX) PetscCall(MatDuplicate(B, MAT_COPY_VALUES, newmat));
61 else if (reuse == MAT_REUSE_MATRIX) PetscCall(MatCopy(B, *newmat, SAME_NONZERO_PATTERN));
69 if (a->B) PetscCall(MatSetType(a->B, MATSEQSELLHIP));