Skip to content
Snippets Groups Projects
Commit 679c4962 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

abort if there is a difference between the analytical Hessian and the fd Hessian

[[Imported from SVN: r7386]]
parent 083e9746
No related branches found
No related tags found
No related merge requests found
......@@ -179,6 +179,15 @@ void testHessian()
std::cout << "hessian:" << std::endl;
printmatrix(std::cout, hessian, "hessian", "--");
///////////////////////////////////////////////////////////////////////////////////
// Abort if there is a difference
///////////////////////////////////////////////////////////////////////////////////
Matrix<FieldMatrix<double,spaceDim,spaceDim> > difference = hessian;
difference -= fdHessian;
if (difference.infinity_norm() > 1e-4)
assert(false);
}
}
......
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