Skip to content
Snippets Groups Projects
Commit 48069693 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Only run debugging code if NDEBUG is unset

parent e56be5fb
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ class SampleFunctional { ...@@ -72,7 +72,7 @@ class SampleFunctional {
} }
Dune::dverb << "Interval now [" << l << "," << r << "]" << std::endl; Dune::dverb << "Interval now [" << l << "," << r << "]" << std::endl;
// Debugging #ifndef NDEBUG
{ {
SmallVector tmpl = x; SmallVector tmpl = x;
tmpl.axpy(l, descDir); tmpl.axpy(l, descDir);
...@@ -81,6 +81,7 @@ class SampleFunctional { ...@@ -81,6 +81,7 @@ class SampleFunctional {
assert(directionalDerivative(tmpl, descDir) < 0); assert(directionalDerivative(tmpl, descDir) < 0);
assert(directionalDerivative(tmpr, descDir) > 0); assert(directionalDerivative(tmpr, descDir) > 0);
} }
#endif
double m = l / 2 + r / 2; double m = l / 2 + r / 2;
SmallVector middle = SmallVector(0.0); SmallVector middle = SmallVector(0.0);
......
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