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

MyConvexProblem::operator()

parent af37d6ee
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,14 @@ class MyConvexProblem { ...@@ -27,6 +27,14 @@ class MyConvexProblem {
VectorType const &f) VectorType const &f)
: A(A), phi(phi), f(f) {}; : A(A), phi(phi), f(f) {};
/* Just for debugging */
double operator()(VectorType const &x) const {
double ret = phi(x) - (f * x);
VectorType tmp(x.size());
A.mv(x, tmp);
return ret + 0.5 * (tmp * x);
}
MatrixType const &A; MatrixType const &A;
Dune::GlobalNonlinearity<MatrixType, VectorType> const &phi; Dune::GlobalNonlinearity<MatrixType, VectorType> const &phi;
......
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