Home
last modified time | relevance | path

Searched refs:icols (Results 1 – 17 of 17) sorted by relevance

/petsc/src/mat/impls/aij/seq/bas/
H A Dspbas.c68 PetscCall(PetscMalloc1(nrows, &result->icols)); in spbas_allocate_pattern()
110 result->icols[0] = result->alloc_icol; in spbas_allocate_data()
111 for (i = 1; i < nrows; i++) result->icols[i] = result->icols[i - 1] + result->row_nnz[i - 1]; in spbas_allocate_data()
125 PetscCall(PetscMalloc1(r_nnz, &result->icols[i])); in spbas_allocate_data()
256 PetscInt *icols; in spbas_compress_pattern() local
313 B->icols[i] = &B->alloc_icol[ptr]; in spbas_compress_pattern()
314 icols = &icol_in[irow_in[i]]; in spbas_compress_pattern()
317 for (j = 0; j < row_nnz; j++) B->icols[i][j] = icols[j]; in spbas_compress_pattern()
319 for (j = 0; j < row_nnz; j++) B->icols[i][j] = icols[j] - i; in spbas_compress_pattern()
321 for (j = 0; j < row_nnz; j++) B->icols[i][j] = icols[j] - icols[0]; in spbas_compress_pattern()
[all …]
H A Dspbas_cholesky.h10 retval.icols[k] = &retval.alloc_icol[*n_alloc_used]; in spbas_cholesky_row_alloc()
112 … PetscCall(PetscIntCast(result->icols[i] - result->alloc_icol + result->row_nnz[i], n_alloc_used)); in spbas_cholesky_garbage_collect()
116 PetscCall(PetscIntCast(result->icols[i] - result->alloc_icol, &i_here)); in spbas_cholesky_garbage_collect()
135 … PetscCall(PetscIntCast(result->icols[i] - result->alloc_icol + result->row_nnz[i], n_alloc_used)); in spbas_cholesky_garbage_collect()
139 PetscCall(PetscIntCast(result->icols[i] - result->alloc_icol, &i_here)); in spbas_cholesky_garbage_collect()
143 PetscCall(PetscArraycpy(&icol_rescue[n_rescue], result->icols[i], result->row_nnz[i])); in spbas_cholesky_garbage_collect()
168 result->icols[i] = result->alloc_icol + (result->icols[i] - alloc_icol_old); in spbas_cholesky_garbage_collect()
169 result->values[i] = result->alloc_val + (result->icols[i] - result->alloc_icol); in spbas_cholesky_garbage_collect()
181 …for (i = 0; i < nrows; i++) result->values[i] = result->alloc_val + (result->icols[i] - result->al… in spbas_cholesky_garbage_collect()
194 … PetscCall(PetscIntCast(result->icols[i] - result->alloc_icol + result->row_nnz[i], n_alloc_used)); in spbas_cholesky_garbage_collect()
[all …]
H A Dspbas.h54 PetscInt **icols; member
/petsc/src/mat/impls/aij/seq/crl/
H A Dcrl.c19 if (aijcrl) PetscCall(PetscFree2(aijcrl->acols, aijcrl->icols)); in MatDestroy_SeqAIJCRL()
37 PetscInt i, j, rmax = a->rmax, *icols, *ilen = a->ilen; in MatSeqAIJCRL_create_aijcrl() local
46 PetscCall(PetscFree2(aijcrl->acols, aijcrl->icols)); in MatSeqAIJCRL_create_aijcrl()
47 PetscCall(PetscMalloc2(rmax * m, &aijcrl->acols, rmax * m, &aijcrl->icols)); in MatSeqAIJCRL_create_aijcrl()
49 icols = aijcrl->icols; in MatSeqAIJCRL_create_aijcrl()
53 icols[j * m + i] = *aj++; in MatSeqAIJCRL_create_aijcrl()
57 icols[j * m + i] = (j) ? icols[(j - 1) * m + i] : 0; /* handle case where row is EMPTY */ in MatSeqAIJCRL_create_aijcrl()
90 PetscInt rmax = aijcrl->rmax, *icols = aijcrl->icols; in MatMult_AIJCRL() local
115 fortranmultcrl_(&m, &rmax, x, y, icols, acols); in MatMult_AIJCRL()
119 for (j = 0; j < m; j++) y[j] = acols[j] * x[icols[j]]; in MatMult_AIJCRL()
[all …]
H A Dcrl.h10 PetscInt *icols; /* columns of nonzeros, stored one column at a time */ member
/petsc/src/mat/impls/aij/mpi/crl/
H A Dmcrl.c23 PetscCall(PetscFree2(aijcrl->acols, aijcrl->icols)); in MatDestroy_MPIAIJCRL()
43 PetscInt i, j, rmax = 0, *icols, *ailen = Aij->ilen, *bilen = Bij->ilen; in MatMPIAIJCRL_create_aijcrl() local
53 PetscCall(PetscFree2(aijcrl->acols, aijcrl->icols)); in MatMPIAIJCRL_create_aijcrl()
54 PetscCall(PetscMalloc2(rmax * m, &aijcrl->acols, rmax * m, &aijcrl->icols)); in MatMPIAIJCRL_create_aijcrl()
56 icols = aijcrl->icols; in MatMPIAIJCRL_create_aijcrl()
60 icols[j * m + i] = *aj++; in MatMPIAIJCRL_create_aijcrl()
64 icols[j * m + i] = nd + *bj++; in MatMPIAIJCRL_create_aijcrl()
68 icols[j * m + i] = (j) ? icols[(j - 1) * m + i] : 0; /* handle case where row is EMPTY */ in MatMPIAIJCRL_create_aijcrl()
/petsc/src/mat/impls/aij/seq/crl/ftn-kernels/
H A Dfmultcrl.F9010 PetscInt, intent(in) :: m, rmax, icols(m, rmax)
16 y(1:m) = acols(1:m, 1)*x(icols(1:m, 1))
18 y(1:m) = y(1:m) + acols(1:m, i)*x(icols(1:m, i))
/petsc/src/mat/impls/maij/
H A Dmaij.c876 PetscInt m, n, i, ncols, *ilen, nmax = 0, *icols, j, k, ii, dof = b->dof; in MatConvert_SeqMAIJ_SeqAIJ() local
892 PetscCall(PetscMalloc1(nmax, &icols)); in MatConvert_SeqMAIJ_SeqAIJ()
897 for (k = 0; k < ncols; k++) icols[k] = dof * cols[k] + j; in MatConvert_SeqMAIJ_SeqAIJ()
898 PetscCall(MatSetValues_SeqAIJ(B, 1, &ii, ncols, icols, vals, INSERT_VALUES)); in MatConvert_SeqMAIJ_SeqAIJ()
903 PetscCall(PetscFree(icols)); in MatConvert_SeqMAIJ_SeqAIJ()
926 PetscInt *oicols = NULL, *icols = NULL, ncols, *cols = NULL, oncols, *ocols = NULL; in MatConvert_MPIMAIJ_MPIAIJ() local
947 PetscCall(PetscMalloc2(nmax, &icols, onmax, &oicols)); in MatConvert_MPIMAIJ_MPIAIJ()
957 for (k = 0; k < ncols; k++) icols[k] = cstart + dof * cols[k] + j; in MatConvert_MPIMAIJ_MPIAIJ()
959 PetscCall(MatSetValues_MPIAIJ(B, 1, &ii, ncols, icols, vals, INSERT_VALUES)); in MatConvert_MPIMAIJ_MPIAIJ()
966 PetscCall(PetscFree2(icols, oicols)); in MatConvert_MPIMAIJ_MPIAIJ()
/petsc/src/mat/graphops/partition/impls/hierarchical/
H A Dhierarchical.c293 IS irows, icols; in MatPartitioningHierarchical_AssembleSubdomain() local
304 PetscCall(ISDuplicate(irows, &icols)); in MatPartitioningHierarchical_AssembleSubdomain()
309 PetscCall(MatCreateSubMatrices(adj, 1, &irows, &icols, MAT_INITIAL_MATRIX, &sadj)); in MatPartitioningHierarchical_AssembleSubdomain()
312 PetscCall(ISDestroy(&icols)); in MatPartitioningHierarchical_AssembleSubdomain()
/petsc/src/mat/impls/adj/mpi/
H A Dmpiadj.c10 static PetscErrorCode MatCreateSubMatrix_MPIAdj_data(Mat adj, IS irows, IS icols, PetscInt **sadj_x… in MatCreateSubMatrix_MPIAdj_data() argument
86 PetscCall(ISGetLocalSize(icols, &icols_n)); in MatCreateSubMatrix_MPIAdj_data()
87 PetscCall(ISGetIndices(icols, &icols_indices)); in MatCreateSubMatrix_MPIAdj_data()
101 PetscCall(ISRestoreIndices(icols, &icols_indices)); in MatCreateSubMatrix_MPIAdj_data()
/petsc/src/mat/impls/is/
H A Dmatis.c1850 IS irows = NULL, icols = NULL; in MatConvert_IS_XAIJ() local
1887 PetscCall(ISInvertPermutation(cols, PETSC_DECIDE, &icols)); in MatConvert_IS_XAIJ()
1894 icols = irows; in MatConvert_IS_XAIJ()
1898 PetscCall(PetscObjectQuery((PetscObject)*M, "_MatIS_IS_XAIJ_icols", (PetscObject *)&icols)); in MatConvert_IS_XAIJ()
1900 if (icols) PetscCall(PetscObjectReference((PetscObject)icols)); in MatConvert_IS_XAIJ()
1902 if (!irows || !icols) { in MatConvert_IS_XAIJ()
1903 PetscCall(ISDestroy(&icols)); in MatConvert_IS_XAIJ()
1909 PetscCall(MatCreateSubMatrix(B, irows, icols, reuse, M)); in MatConvert_IS_XAIJ()
1911 PetscCall(PetscObjectCompose((PetscObject)*M, "_MatIS_IS_XAIJ_icols", (PetscObject)icols)); in MatConvert_IS_XAIJ()
1915 PetscCall(MatCreateSubMatrix(B, irows, icols, MAT_INITIAL_MATRIX, &C)); in MatConvert_IS_XAIJ()
[all …]
/petsc/src/mat/impls/sbaij/seq/
H A Dsbaij.c1566 const PetscInt *icols = jj + ii[i]; in MatSeqSBAIJSetPreallocationCSR_SeqSBAIJ() local
1570 PetscCall(MatSetValuesBlocked_SeqSBAIJ(B, 1, &i, ncols, icols, svals, INSERT_VALUES)); in MatSeqSBAIJSetPreallocationCSR_SeqSBAIJ()
1574 PetscCall(MatSetValuesBlocked_SeqSBAIJ(B, 1, &i, 1, &icols[j], svals, INSERT_VALUES)); in MatSeqSBAIJSetPreallocationCSR_SeqSBAIJ()
/petsc/src/mat/impls/dense/seq/
H A Ddense.c1426 PetscInt nnz = 0, *rlens, *icols; in MatLoad_Dense_Binary() local
1432 PetscCall(PetscMalloc2(nnz, &icols, nnz, &vwork)); in MatLoad_Dense_Binary()
1433 …PetscCall(PetscViewerBinaryReadAll(viewer, icols, nnz, PETSC_DETERMINE, PETSC_DETERMINE, PETSC_INT… in MatLoad_Dense_Binary()
1437 for (j = 0; j < rlens[i]; j++, k++) v[i + lda * icols[k]] = vwork[k]; in MatLoad_Dense_Binary()
1439 PetscCall(PetscFree2(icols, vwork)); in MatLoad_Dense_Binary()
/petsc/src/mat/impls/sbaij/mpi/
H A Dmpisbaij.c2027 const PetscInt *icols = jj + ii[i]; in MatMPISBAIJSetPreallocationCSR_MPISBAIJ() local
2030 PetscCall(MatSetValuesBlocked_MPISBAIJ(B, 1, &row, ncols, icols, svals, INSERT_VALUES)); in MatMPISBAIJSetPreallocationCSR_MPISBAIJ()
2035 PetscCall(MatSetValuesBlocked_MPISBAIJ(B, 1, &row, 1, &icols[j], svals, INSERT_VALUES)); in MatMPISBAIJSetPreallocationCSR_MPISBAIJ()
/petsc/src/mat/impls/baij/mpi/
H A Dmpibaij.c2590 const PetscInt *icols = jj + ii[i]; in MatMPIBAIJSetPreallocationCSR_MPIBAIJ() local
2593 PetscCall(MatSetValuesBlocked_MPIBAIJ(B, 1, &row, ncols, icols, svals, INSERT_VALUES)); in MatMPIBAIJSetPreallocationCSR_MPIBAIJ()
2598 PetscCall(MatSetValuesBlocked_MPIBAIJ(B, 1, &row, 1, &icols[j], svals, INSERT_VALUES)); in MatMPIBAIJSetPreallocationCSR_MPIBAIJ()
/petsc/src/mat/impls/baij/seq/
H A Dbaij.c3402 const PetscInt *icols = jj + ii[i]; in MatSeqBAIJSetPreallocationCSR_SeqBAIJ() local
3405 PetscCall(MatSetValuesBlocked_SeqBAIJ(B, 1, &i, ncols, icols, svals, INSERT_VALUES)); in MatSeqBAIJSetPreallocationCSR_SeqBAIJ()
3410 PetscCall(MatSetValuesBlocked_SeqBAIJ(B, 1, &i, 1, &icols[j], svals, INSERT_VALUES)); in MatSeqBAIJSetPreallocationCSR_SeqBAIJ()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DMat.pyx2590 cdef const PetscInt *icols=NULL
2592 CHKERR(MatGetRow(self.mat, irow, &ncols, &icols, &svals))
2593 cdef object cols = array_i(ncols, icols)
2595 CHKERR(MatRestoreRow(self.mat, irow, &ncols, &icols, &svals))