Skip to content
Snippets Groups Projects
Commit 6457e755 authored by Markus Blatt's avatar Markus Blatt
Browse files

grrr! testing for !=0 skips row zero.

loops now start with n and the first step is --i and we are testing
for i>0.

[[Imported from SVN: r4833]]
parent d18e0356
No related branches found
No related tags found
No related merge requests found
......@@ -704,7 +704,8 @@ namespace Dune {
}
// U A^{-1} = Y
for (size_type i=n-1; i!=0; i--) {
for (size_type i=n; i>0;) {
--i;
for (size_type k=0; k<n; k++) {
for (size_type j=i+1; j<n; j++)
p[i][k] -= U[i][j]*p[j][k];
......@@ -712,7 +713,8 @@ namespace Dune {
}
}
for(size_type i=n-1; i!=0; --i) {
for(size_type i=n; i>0; ) {
--i;
if(i!=pivot[i])
for(size_type j=0; j<n; ++j)
std::swap(p[j][pivot[i]], p[j][i]);
......
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