diff --git a/dune/tectonic/globalnonlinearity.hh b/dune/tectonic/globalnonlinearity.hh index 4ea304e0e0d5a2e6b8337413cc70e44a4e9df70e..b8c624928db99bceb6091e2f7b80f4b9785512d2 100644 --- a/dune/tectonic/globalnonlinearity.hh +++ b/dune/tectonic/globalnonlinearity.hh @@ -18,6 +18,15 @@ class GlobalNonlinearity { typedef VectorTypeTEMPLATE VectorType; typedef MatrixTypeTEMPLATE MatrixType; + double operator()(VectorType const &x) const { + double tmp = 0; + for (size_t i = 0; i < x.size(); ++i) { + auto const res = restriction(i); + tmp += (*res)(x[i]); + } + return tmp; + } + /* Return a restriction of the outer function to the i'th node. */