diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 6a2ea6bcb3abb853f95a1beb74185774371a6e8a..327135cbcad84833b3ceb8df5f777e649a35644d 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -110,21 +110,19 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis, Dune::BlockVector<LocalVectorType> &f, double time) { // constant sample function on neumann // boundary - BoundaryPatch<GridView> neumannBoundary(gridView, neumannNodes); + BoundaryPatch<GridView> const neumannBoundary(gridView, neumannNodes); LocalVectorType SampleVector(0); // FIXME: random values (time-dependent) SampleVector[0] = (time <= 0.5) ? sin(time * 2 * M_PI) * 1e3 : (time - 0.5) * 2 * 1e4; SampleVector[1] = 0; - ConstantFunction<LocalVectorType, LocalVectorType> fNeumann(SampleVector); + ConstantFunction<LocalVectorType, LocalVectorType> const fNeumann( + SampleVector); NeumannBoundaryAssembler<GridType, LocalVectorType> neumannBoundaryAssembler( fNeumann); - BoundaryFunctionalAssembler<FEBasis> boundaryFunctionalAssembler( - feBasis, neumannBoundary); - boundaryFunctionalAssembler.assemble( - neumannBoundaryAssembler, f, - true); // whether to resize the output vector and zero all of its entries + BoundaryFunctionalAssembler<FEBasis>(feBasis, neumannBoundary).assemble( + neumannBoundaryAssembler, f, true); // resize and zero output vector } // Assembles constant 1-function on frictional boundary in nodalIntegrals @@ -133,12 +131,12 @@ Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> assemble_frictional(GridView const &gridView, FEBasis const &feBasis, Dune::BitSetVector<1> const &frictionalNodes) { typedef Dune::FieldVector<double, 1> Singleton; - BoundaryPatch<GridView> frictionalBoundary(gridView, frictionalNodes); - ConstantFunction<LocalVectorType, Singleton> constantOneFunction(1); + BoundaryPatch<GridView> const frictionalBoundary(gridView, frictionalNodes); + ConstantFunction<LocalVectorType, Singleton> const constantOneFunction(1); NeumannBoundaryAssembler<GridType, Singleton> frictionalBoundaryAssembler( constantOneFunction); - auto nodalIntegrals = Dune::make_shared<Dune::BlockVector<Singleton>>(); + auto const nodalIntegrals = Dune::make_shared<Dune::BlockVector<Singleton>>(); BoundaryFunctionalAssembler<FEBasis>(feBasis, frictionalBoundary) .assemble(frictionalBoundaryAssembler, *nodalIntegrals, true); // resize and zero output vector