From d61e33ba2ee43973411788dce0d84ea371e06597 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Thu, 3 Nov 2011 16:06:12 +0100 Subject: [PATCH] Do not write to f directly; add to it --- src/one-body-sample.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index d41e7db9..4ccaa3ca 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; -- GitLab