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

Allow for comparison of minima

parent 72098d6b
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <cassert> #include <cassert>
template <int dim, class Function> template <int dim, class Function>
void functionTester( double functionTester(
Dune::SampleFunctional<dim, Function> J, Dune::SampleFunctional<dim, Function> J,
typename Dune::SampleFunctional<dim, Function>::SmallVector &start, typename Dune::SampleFunctional<dim, Function>::SmallVector &start,
size_t runs) { size_t runs) {
...@@ -23,7 +23,9 @@ void functionTester( ...@@ -23,7 +23,9 @@ void functionTester(
if (i != runs) if (i != runs)
std::cout << "New value: J(...) = " << J(start) << std::endl; std::cout << "New value: J(...) = " << J(start) << std::endl;
} }
std::cout << "Final value J(...) = " << J(start) << std::endl; double const final = J(start);
std::cout << "Final value J(...) = " << final << std::endl;
return final;
} }
void testSampleFunction() { void testSampleFunction() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment