diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 830939b5d6f70b81744971f64b0a712ffb889868..4f7359d51bfbb588dd31c7ec87714abd5c675023 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -158,17 +158,19 @@ int main() { BoundaryPatch<GridType::LeafGridView> neumannBoundary(grid.leafView(), neumannNodes); - std::vector<Dune::FieldVector<double, 1>> b; - ConstantFunction<SmallVector, Dune::FieldVector<double, 1>> - constantOneFunction(1); - NeumannBoundaryAssembler<GridType, Dune::FieldVector<double, 1>> - neumannBoundaryAssembler(constantOneFunction); - - BoundaryFunctionalAssembler<P1Basis> boundaryFunctionalAssembler( - p1Basis, neumannBoundary); - boundaryFunctionalAssembler.assemble( - neumannBoundaryAssembler, b, - true); // resize the output vector and zero all of its entries + { // constant 1D function + std::vector<Dune::FieldVector<double, 1>> b; + ConstantFunction<SmallVector, Dune::FieldVector<double, 1>> + constantOneFunction(1); + NeumannBoundaryAssembler<GridType, Dune::FieldVector<double, 1>> + neumannBoundaryAssembler(constantOneFunction); + + BoundaryFunctionalAssembler<P1Basis> boundaryFunctionalAssembler( + p1Basis, neumannBoundary); + boundaryFunctionalAssembler.assemble( + neumannBoundaryAssembler, b, + true); // resize the output vector and zero all of its entries + } } { // experiment with convex problems and the like