Commit 7e72f941 authored by Alexander Danilov's avatar Alexander Danilov

Tests: solver_test000: use L1 norm for validation

parent b44ff0bd
......@@ -79,7 +79,7 @@ int main(int argc,char ** argv)
double err = 0;
for( INMOST_DATA_ENUM_TYPE i = mbeg; i != mend; i++ )
{
err += (x[i] - static_cast<double>(i)/10.0);
err += fabs(x[i] - static_cast<double>(i)/10.0);
}
#if defined(USE_MPI)
double tmp;
......@@ -92,7 +92,7 @@ int main(int argc,char ** argv)
std::cout << "done, error " << err << "\t\t\t" << std::endl;
}
if( fabs(err) > 1.0e-5 || err!=err) MPI_Abort(MPI_COMM_WORLD,-1);
if( err > 1.0e-5 || err!=err) MPI_Abort(MPI_COMM_WORLD,-1);
x.Save("output.rhs");
b.Save("b.rhs");
......@@ -101,4 +101,4 @@ int main(int argc,char ** argv)
Solver::Finalize(); // Finalize solver and close MPI activity
return 0;
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment