45 assert( dofptr != NULL );
49 spm->
nexp = dofptr[ spm->
n ] - baseval;
62 for(j=0; j<spm->
n; j++, colptr++) {
63 dofj = dofptr[j+1] - dofptr[j];
65 for(k=colptr[0]; k<colptr[1]; k++, rowptr++) {
66 i = *rowptr - baseval;
67 dofi = dofptr[i+1] - dofptr[i];
69 spm->
nnzexp += dofi * dofj;
74 for(k=0; k<spm->
nnz; k++, rowptr++, colptr++)
76 i = *rowptr - baseval;
77 j = *colptr - baseval;
78 dofi = dofptr[i+1] - dofptr[i];
79 dofj = dofptr[j+1] - dofptr[j];
81 spm->
nnzexp += dofi * dofj;
108 spm_int_t ig, jl, jg, k, dofi, dofj, nnz;
117 for(jl=0; jl<spm->
n; jl++, colptr++, loc2glob++) {
119 dofj = dofptr[jg+1] - dofptr[jg];
124 for(k=colptr[0]; k<colptr[1]; k++, rowptr++) {
126 dofi = dofptr[ig+1] - dofptr[ig];
131 spm->
nnzexp += dofj * nnz;
150 const spm_int_t *dofptr, *colptr, *rowptr, *loc2glob;
157 assert( spm->
dofs != NULL );
160 for(k=0; k<spm->
nnz; k++, rowptr++, colptr++)
164 dofi = dofptr[ig+1] - dofptr[ig];
165 dofj = dofptr[jg+1] - dofptr[jg];
167 spm->
nnzexp += dofi * dofj;
171 for(k=0; k<spm->
n; k++, loc2glob++)
174 spm->
nexp += dofptr[ig+1] - dofptr[ig];
192 assert( spm->
dofs != NULL );
230 if ( spm->
dof > 0 ) {
249#if defined(SPM_WITH_MPI)
#define SPM_MPI_INT
The MPI type associated to spm_int_t.
void spmUpdateComputedFields(spmatrix_t *spm)
Update all the computed fields based on the static values stored.
int spm_int_t
The main integer datatype used in spm arrays.
The sparse matrix data structure.
static void spm_ucf_variadic_mpi_ijv(spmatrix_t *spm)
Compute the expended field for variadic dof in the distributed case for IJV format.
static void spm_ucf_variadic_mpi_csx(spmatrix_t *spm, const spm_int_t *colptr, const spm_int_t *rowptr)
Compute the expended field for variadic dof in the distributed case for CSC/CSR formats.
static void spm_ucf_variadic_mpi(spmatrix_t *spm)
Compute the expended field for variadic dof in the distributed case.
static void spm_ucf_variadic_shm(spmatrix_t *spm)
Compute the expended field for variadic dof in the shared memory case.