56 for (i=0; i<n; i++, colptr++)
58 size = colptr[1] - colptr[0];
60#if defined(PRECISION_p)
61 spmIntSort1Asc1( rowptr, size );
72 for (i=0; i<n; i++, rowptr++)
74 size = rowptr[1] - rowptr[0];
76#if defined(PRECISION_p)
77 spmIntSort1Asc1( colptr, size );
93#if defined(PRECISION_p)
94 spmIntMSortIntAsc( sortptr, size );
142 for ( j = 0; j < size; j++, colptr++, loc2glob++ )
144 jg = spm->
replicated ? j : *loc2glob - baseval;
145 dofj = (dof > 0) ? dof : dofs[jg+1] - dofs[jg];
147 for ( i = colptr[0]; i < colptr[1]; i++, rowptr++, indexes++ )
149 ig = *rowptr - baseval;
150 dofi = (dof > 0) ? dof : dofs[ig+1] - dofs[ig];
198 dofs = spm->
dofs - baseval;
199 for ( i = 0; i < size; i++, colptr++, rowptr++, indexes++ )
202 dofj = (dof > 0) ? dof : dofs[jg+1] - dofs[jg];
204 dofi = (dof > 0) ? dof : dofs[ig+1] - dofs[ig];
static void c_spm_sort_multidof_csx_values(const spmatrix_t *spm, const spm_complex32_t *values, spm_complex32_t *newval)
Apply the permutations on the values array for a CSX spm The values array holds the permutation index...
static void c_spm_sort_multidof_ijv_values(const spmatrix_t *spm, const spm_complex32_t *values, spm_complex32_t *newval)
Apply the permutations on the values array fon an IJV spm. The values array holds the permutation ind...
double spm_fixdbl_t
Double datatype that is not converted through precision generator functions.
float _Complex spm_complex32_t
enum spm_coeftype_e spm_coeftype_t
Arithmetic types.
spm_int_t * spm_get_value_idx_by_elt(const spmatrix_t *spm)
Create an array that represents the shift for each sub-element of the original multidof value array.
static void c_spmSortMultidof(spmatrix_t *spm)
This routine sorts the multiple dof spm matrix.
void c_spmSort(spmatrix_t *spm)
This routine sorts the spm matrix.
static void c_spmSortNoDof(spmatrix_t *spm)
This routine sorts the single dof spm matrix.
void c_spmIntFltSortAsc(void **const pbase, const spm_int_t n)
Integer routines.
void c_spmIntIntFltSortAsc(void **const pbase, const spm_int_t n)
Sort 2 arrays simultaneously, the first array is an array of spm_int_t and used as key for sorting....
int spm_int_t
The main integer datatype used in spm arrays.
int spmSort(spmatrix_t *spm)
Sort the subarray of edges of each vertex.
The sparse matrix data structure.
spm_int_t * spm_getandset_glob2loc(spmatrix_t *spm)
Computes the glob2loc array if needed, and returns it.
int spm_get_distribution(const spmatrix_t *spm)
Search the distribution pattern used in the spm structure.