int * col_index_ptr;
TrilinosScalar const* col_value_ptr;
+ int n_columns;
// If we don't elide zeros, the pointers
// are already available...
{
col_index_ptr = (int*)col_indices;
col_value_ptr = values;
+ n_columns = n_cols;
}
else
{
column_indices.resize(n_cols);
column_values.resize(n_cols);
- unsigned int n_columns = 0;
+ n_columns = 0;
for (unsigned int j=0; j<n_cols; ++j)
if (values[j] != 0)
{
column_values[n_columns] = values[j];
n_columns++;
}
- Assert(n_columns <= n_cols, ExcInternalError());
+ Assert(n_columns <= (int)n_cols, ExcInternalError());
col_index_ptr = (int*)&column_indices[0];
col_value_ptr = &column_values[0];
{
if (matrix->Filled() == false)
{
- ierr = matrix->Epetra_CrsMatrix::InsertGlobalValues(row, n_cols,
+ ierr = matrix->Epetra_CrsMatrix::InsertGlobalValues(row, n_columns,
const_cast<double*>(col_value_ptr),
col_index_ptr);
ierr = 0;
}
else
- ierr = matrix->Epetra_CrsMatrix::ReplaceGlobalValues(row, n_cols,
+ ierr = matrix->Epetra_CrsMatrix::ReplaceGlobalValues(row, n_columns,
const_cast<double*>(col_value_ptr),
col_index_ptr);
}
if (matrix->Filled() == false)
{
ierr = matrix->InsertGlobalValues (1, (int*)&row,
- (int)n_cols, col_index_ptr,
+ n_columns, col_index_ptr,
&col_value_ptr,
Epetra_FECrsMatrix::ROW_MAJOR);
if (ierr > 0)
}
else
ierr = matrix->ReplaceGlobalValues (1, (int*)&row,
- (int)n_cols, col_index_ptr,
+ n_columns, col_index_ptr,
&col_value_ptr,
Epetra_FECrsMatrix::ROW_MAJOR);
}
Assert (ierr <= 0, ExcAccessToNonPresentElement(row, col_index_ptr[0]));
- AssertThrow (ierr == 0, ExcTrilinosError(ierr));
+ AssertThrow (ierr >= 0, ExcTrilinosError(ierr));
}
int * col_index_ptr;
TrilinosScalar const* col_value_ptr;
+ int n_columns;
// If we don't elide zeros, the pointers
// are already available...
{
col_index_ptr = (int*)col_indices;
col_value_ptr = values;
+ n_columns = n_cols;
}
else
{
column_indices.resize(n_cols);
column_values.resize(n_cols);
- unsigned int n_columns = 0;
+ n_columns = 0;
for (unsigned int j=0; j<n_cols; ++j)
if (values[j] != 0)
{
column_values[n_columns] = values[j];
n_columns++;
}
- Assert(n_columns <= n_cols, ExcInternalError());
+ Assert(n_columns <= (int)n_cols, ExcInternalError());
col_index_ptr = (int*)&column_indices[0];
col_value_ptr = &column_values[0];
// than the Epetra_FECrsMatrix function.
if (row_map.MyGID(row) == true)
{
- ierr = matrix->Epetra_CrsMatrix::SumIntoGlobalValues(row, n_cols,
+ ierr = matrix->Epetra_CrsMatrix::SumIntoGlobalValues(row, n_columns,
const_cast<double*>(col_value_ptr),
col_index_ptr);
}
// one element at a time).
compressed = false;
- ierr = matrix->SumIntoGlobalValues (1, (int*)&row, (int)n_cols,
+ ierr = matrix->SumIntoGlobalValues (1, (int*)&row, n_columns,
col_index_ptr,
&col_value_ptr,
Epetra_FECrsMatrix::ROW_MAJOR);
}
Assert (ierr <= 0, ExcAccessToNonPresentElement(row, col_index_ptr[0]));
- AssertThrow (ierr == 0, ExcTrilinosError(ierr));
+ AssertThrow (ierr >= 0, ExcTrilinosError(ierr));
}