Lines Matching +full:- +full:b
5 static PetscErrorCode MatMPISELLSetPreallocation_MPISELLCUDA(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) {
15 PetscCall(MatCreate(PETSC_COMM_SELF, &b->A));
16 PetscCall(MatBindToCPU(b->A, B->boundtocpu));
17 PetscCall(MatSetSizes(b->A, B->rmap->n, B->cmap->n, B->rmap->n, B->cmap->n));
18 PetscCall(MatSetType(b->A, MATSEQSELLCUDA));
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, MATSEQSELLCUDA));
24 PetscCall(MatSeqSELLSetPreallocation(b->A, d_rlenmax, d_rlen));
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;
41 if (!A->was_assembled && mode == MAT_FINAL_ASSEMBLY) PetscCall(VecSetType(((Mat_MPISELL *)A->data)->lvec, VECSEQCUDA));
53 PETSC_INTERN PetscErrorCode MatConvert_MPISELL_MPISELLCUDA(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));
63 A->boundtocpu = PETSC_FALSE;
64 PetscCall(PetscFree(A->defaultvectype));
65 PetscCall(PetscStrallocpy(VECCUDA, &A->defaultvectype));
67 a = (Mat_MPISELL *)A->data;
68 if (a->A) PetscCall(MatSetType(a->A, MATSEQSELLCUDA));
69 if (a->B) PetscCall(MatSetType(a->B, MATSEQSELLCUDA));
70 if (a->lvec) PetscCall(VecSetType(a->lvec, VECSEQCUDA));
72 A->ops->assemblyend = MatAssemblyEnd_MPISELLCUDA;
73 A->ops->setfromoptions = MatSetFromOptions_MPISELLCUDA;
74 A->ops->destroy = MatDestroy_MPISELLCUDA;
91 MatCreateSELLCUDA - Creates a sparse matrix in SELL format.
97 + comm - MPI communicator, set to `PETSC_COMM_SELF`
98 . m - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)
100 y vector for the matrix-vector product y = Ax.
101 . n - This value should be the same as the local size used in creating the
102 x vector for the matrix-vector product y = Ax. (or PETSC_DECIDE to have
104 . M - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)
105 . N - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)
106 . d_nz - number of nonzeros per row in DIAGONAL portion of local submatrix
108 . d_nnz - array containing the number of nonzeros in the various rows of the
114 . o_nz - number of nonzeros per row in the OFF-DIAGONAL portion of local
116 - o_nnz - array containing the number of nonzeros in the various rows of the
117 OFF-DIAGONAL portion of the local submatrix (possibly different for
123 . A - the matrix
155 MATSELLCUDA - "sellcuda" = "mpisellcuda" - A matrix type to be used for sparse matrices.
166 . -mat_type mpisellcuda - sets the matrix type to `MATMPISELLCUDA` during a call to MatSetFromOptions()