Skip to content
Snippets Groups Projects
Commit cb811462 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Use lambda

parent 9682aa51
No related branches found
No related tags found
No related merge requests found
......@@ -364,6 +364,12 @@
auto const timesteps = parset.get<size_t>("timeSteps");
auto const tau = parset.get<double>("endOfTime") / timesteps;
auto createRHS = [&](double _time, VectorType &_ell) {
assemble_neumann<GridType, GridView, SmallVector, P1Basis>
(leafView, p1Basis, neumannNodes, _ell, neumannFunction, _time);
_ell += gravityFunctional;
};
auto const state_fpi_max
= parset.get<size_t>("solver.tnnmg.fixed_point_iterations");
for (size_t run = 1; run <= timesteps; ++run) {
......@@ -378,9 +384,7 @@
double const time = tau * run;
VectorType ell(finestSize);
assemble_neumann<GridType, GridView, SmallVector, P1Basis>
(leafView, p1Basis, neumannNodes, ell, neumannFunction, time);
ell += gravityFunctional;
createRHS(time, ell);
MatrixType problem_A;
VectorType problem_rhs(finestSize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment