62 if ( spm->
dof != 1 ) {
63 spm_print_error(
"Cannot extend spm including dofs already\n" );
83 dofptr = newspm->
dofs;
91 for(i=0; i<spm->
gN; i++, dofptr++) {
92 dofi = 1 + ( rand() % dof );
93 dofptr[1] = dofptr[0] + dofi;
96#if defined(SPM_WITH_MPI)
void s_spmDofExtend(spmatrix_t *spm)
Extend a single dof sparse matrix to a multi-dof sparse matrix.
void z_spmDofExtend(spmatrix_t *spm)
Extend a single dof sparse matrix to a multi-dof sparse matrix.
void c_spmDofExtend(spmatrix_t *spm)
Extend a single dof sparse matrix to a multi-dof sparse matrix.
void d_spmDofExtend(spmatrix_t *spm)
Extend a single dof sparse matrix to a multi-dof sparse matrix.
#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.
int spmDofExtend(const spmatrix_t *spm, int type, int dof, spmatrix_t *spm_out)
Generate a random multidof spm from a given spm (with dof=1).
void spmCopy(const spmatrix_t *spm_in, spmatrix_t *spm_out)
Create a copy of the spm.
The sparse matrix data structure.