122 int *n2o_row,
int *n2o_col,
char *filename)
125 int *o2n_col = NULL, pe, i, j, *cval, len;
132 o2n_col = (
int *)
MALLOC_DH (m *
sizeof (
int));
134 for (i = 0; i < m; ++i)
135 o2n_col[n2o_col[i]] = i;
138 for (pe = 0; pe <
np_dh; ++pe)
147 fp = fopen (filename,
"w");
151 fp = fopen (filename,
"a");
155 sprintf (
msgBuf_dh,
"can't open %s for writing\n", filename);
159 for (i = 0; i < m; ++i)
166 for (j = 0; j < len; ++j)
168 fprintf (fp,
"%i %i %g\n", i + 1, cval[j], aval[j]);
175 newRow = n2o_row[i] + beg_row;
178 for (j = 0; j < len; ++j)
180 newCol = o2n_col[cval[j] - beg_row] + beg_row;
181 fprintf (fp,
"%i %i %g\n", i + 1, newCol, aval[j]);