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

Implement operator() for global nonlinearities

parent cb40bb5a
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,15 @@ class GlobalNonlinearity { ...@@ -18,6 +18,15 @@ class GlobalNonlinearity {
typedef VectorTypeTEMPLATE VectorType; typedef VectorTypeTEMPLATE VectorType;
typedef MatrixTypeTEMPLATE MatrixType; 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. Return a restriction of the outer function to the i'th node.
*/ */
......
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