diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 7e5a5c23b32920a1d78d0407b7c9ab2b480d97b5..043d8855bdb869777f0e97e55d70b54a4121a7aa 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -181,6 +181,11 @@ int main() { VectorType u2 = u1; VectorType f(grid.size(grid.maxLevel(), dim)); + + std::vector<Dune::FieldVector<double, 1>> nodalIntegrals; + assemble_frictional<GridType, GridType::LeafGridView, SmallVector, P1Basis>( + leafView, p1Basis, frictionalNodes, nodalIntegrals); + for (size_t run = 1; run <= runs; ++run) { f = 0; VectorType neumannTerm(grid.size(grid.maxLevel(), dim)); @@ -189,11 +194,6 @@ int main() { f += neumannTerm; // {{{ Assemble terms for the nonlinearity - std::vector<Dune::FieldVector<double, 1>> nodalIntegrals; - assemble_frictional<GridType, GridType::LeafGridView, SmallVector, - P1Basis>(leafView, p1Basis, frictionalNodes, - nodalIntegrals); - // TODO: Random value std::vector<double> normalStress; normalStress.resize(grid.size(grid.maxLevel(), dim));