Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 07985b26 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Silent warning when printing complex

parent 12b0ddb5
No related branches found
No related tags found
No related merge requests found
...@@ -61,11 +61,11 @@ z_spmPrint( const pastix_spm_t *spm ) ...@@ -61,11 +61,11 @@ z_spmPrint( const pastix_spm_t *spm )
{ {
for(jj=0; jj<dofj; jj++, valptr++) for(jj=0; jj<dofj; jj++, valptr++)
{ {
fprintf( stderr, "%ld %ld %e\n", fprintf( stderr, "%ld %ld (%e, %e)\n",
row + jj, col + ii, *valptr ); row + jj, col + ii, creal(*valptr), cimag(*valptr) );
if (i != j) { if (i != j) {
fprintf( stderr, "%ld %ld %e\n", fprintf( stderr, "%ld %ld (%e, %e)\n",
col + ii, row + jj, conj(*valptr) ); col + ii, row + jj, creal(conj(*valptr)), cimag(conj(*valptr)) );
} }
} }
} }
...@@ -89,12 +89,21 @@ z_spmPrint( const pastix_spm_t *spm ) ...@@ -89,12 +89,21 @@ z_spmPrint( const pastix_spm_t *spm )
{ {
for(jj=0; jj<dofj; jj++, valptr++) for(jj=0; jj<dofj; jj++, valptr++)
{ {
#if defined(PRECISION_z) || defined(PRECISION_c)
fprintf( stderr, "%ld %ld (%e, %e)\n",
row + jj, col + ii, creal(*valptr), cimag(*valptr) );
if (i != j) {
fprintf( stderr, "%ld %ld (%e, %e)\n",
col + ii, row + jj, creal(*valptr), cimag(*valptr) );
}
#else
fprintf( stderr, "%ld %ld %e\n", fprintf( stderr, "%ld %ld %e\n",
row + jj, col + ii, *valptr ); row + jj, col + ii, *valptr );
if (i != j) { if (i != j) {
fprintf( stderr, "%ld %ld %e\n", fprintf( stderr, "%ld %ld %e\n",
col + ii, row + jj, *valptr ); col + ii, row + jj, *valptr );
} }
#endif
} }
} }
} }
...@@ -117,8 +126,13 @@ z_spmPrint( const pastix_spm_t *spm ) ...@@ -117,8 +126,13 @@ z_spmPrint( const pastix_spm_t *spm )
{ {
for(jj=0; jj<dofj; jj++, valptr++) for(jj=0; jj<dofj; jj++, valptr++)
{ {
#if defined(PRECISION_z) || defined(PRECISION_c)
fprintf( stderr, "%ld %ld (%e, %e)\n",
row + jj, col + ii, creal(*valptr), cimag(*valptr) );
#else
fprintf( stderr, "%ld %ld %e\n", fprintf( stderr, "%ld %ld %e\n",
row + jj, col + ii, *valptr ); row + jj, col + ii, *valptr );
#endif
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment