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

Fixed bug introduced by Christian.

The check i>=0 is always true if i is unsigned!

[[Imported from SVN: r4830]]
parent 6a35dd6c
No related branches found
No related tags found
No related merge requests found
......@@ -704,7 +704,7 @@ namespace Dune {
}
// U A^{-1} = Y
for (size_type i=n-1; i>=0; i--) {
for (size_type i=n-1; 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 +712,7 @@ namespace Dune {
}
}
for(size_type i=n-1; i>=0; --i) {
for(size_type i=n-1; 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