diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index d41e7db90444599343395e377564221f03c7287c..4ccaa3ca5d19e80fcfb450a90cfee412b1e6f445 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -173,8 +173,11 @@ int main() { VectorType u2 = u1; VectorType f(grid.size(grid.maxLevel(), dim)); + f = 0; + VectorType neumannTerm(grid.size(grid.maxLevel(), dim)); assemble_neumann<GridType, GridType::LeafGridView, SmallVector, P1Basis>( - leafView, p1Basis, neumannNodes, f); + leafView, p1Basis, neumannNodes, neumannTerm); + f += neumannTerm; // {{{ Assemble terms for the nonlinearity std::vector<Dune::FieldVector<double, 1>> nodalIntegrals;