pos_right_of_diagonal[row];
Assert (first_right_of_diagonal_index <= *(rowstart_ptr+1),
ExcInternalError());
- number s = *dst_ptr;
+ number s = 0;
for (unsigned int j=(*rowstart_ptr)+1; j<first_right_of_diagonal_index; ++j)
- s -= val[j] * dst(cols->colnums[j]);
+ s += val[j] * dst(cols->colnums[j]);
// divide by diagonal element
- *dst_ptr = s * om / val[*rowstart_ptr];
+ *dst_ptr -= s * om;
+ *dst_ptr /= val[*rowstart_ptr];
};
rowstart_ptr = &cols->rowstart[0];
const unsigned int end_row = *(rowstart_ptr+1);
const unsigned int first_right_of_diagonal_index
= pos_right_of_diagonal[row];
- number s = *dst_ptr;
+ number s = 0;
for (unsigned int j=first_right_of_diagonal_index; j<end_row; ++j)
- s -= val[j] * dst(cols->colnums[j]);
+ s += val[j] * dst(cols->colnums[j]);
- *dst_ptr = s * om / val[*rowstart_ptr];
+ *dst_ptr -= s * om;
+ *dst_ptr /= val[*rowstart_ptr];
};
return;
}
-
&cols->colnums[0]);
- number s = *dst_ptr;
+ number s = 0;
for (unsigned int j=(*rowstart_ptr)+1; j<first_right_of_diagonal_index; ++j)
- s -= val[j] * dst(cols->colnums[j]);
+ s += val[j] * dst(cols->colnums[j]);
// divide by diagonal element
- *dst_ptr = s * om / val[*rowstart_ptr];
+ *dst_ptr -= s * om;
+ *dst_ptr /= val[*rowstart_ptr];
};
rowstart_ptr = &cols->rowstart[0];
&cols->colnums[end_row],
static_cast<unsigned int>(row)) -
&cols->colnums[0]);
- number s = *dst_ptr;
+ number s = 0;
for (unsigned int j=first_right_of_diagonal_index; j<end_row; ++j)
- s -= val[j] * dst(cols->colnums[j]);
- *dst_ptr = s * om / val[*rowstart_ptr];
+ s += val[j] * dst(cols->colnums[j]);
+ *dst_ptr -= s * om;
+ *dst_ptr /= val[*rowstart_ptr];
};
}
for (ri = row_info.begin(); ri != end; ++dst_ptr, ++src_ptr, ++ri)
{
Assert (ri->diagonal != RowInfo::invalid_diagonal, ExcNoDiagonal());
- number s = *src_ptr;
+ number s = 0;
const unsigned int end_row = ri->start + ri->diagonal;
for (unsigned int i=ri->start;i<end_row;++i)
- s -= data[i].value * dst(data[i].column);
+ s += data[i].value * dst(data[i].column);
- *dst_ptr = s * om / data[ri->start + ri->diagonal].value;
+ *dst_ptr = *src_ptr - s * om;
+ *dst_ptr /= data[ri->start + ri->diagonal].value;
}
// Diagonal
dst_ptr = dst.begin();
for (rri = row_info.rbegin(); rri != rend; --dst_ptr, ++rri)
{
const unsigned int end_row = rri->start + rri->length;
- number s = *dst_ptr;
+ number s = 0;
for (unsigned int i=rri->start+rri->diagonal+1;i<end_row;++i)
- s -= om * data[i].value * dst(data[i].column);
+ s += data[i].value * dst(data[i].column);
- *dst_ptr = s * om / data[rri->start + rri->diagonal].value;
+ *dst_ptr -= s * om;
+ *dst_ptr /= data[rri->start + rri->diagonal].value;
}
}