Extend adaptivity to handle multiple function spaces and solutions
Right now, adapt_grid()
is restricted to a single function space on the grid and can only transport one or two solutions on that function space to the new grid. Christian told me that some people in Münster need to be able to adapt multiple independent function spaces in parallel.
My idea for an interface would approximately look like this:
adapt_grid(
grid,
transport_solutions(gfs1,integration_order,x1_1,x1_2,...),
transport_solutions(gfs2,integration_order,x2_1,...),
...
);
We might have to change the name of adapt_grid()
though, if we want to keep backwards compatibility.
The transport_solutions()
calls would simply return a little helper struct that ties together its arguments and provides a number of methods for backing up and restoring the solution before / after grid adaptation.
Any thoughts?