Make GridFunctionAdapter reference_wrapper aware
I ran repeatedly into the problem that GridFunctionAdapter
holds an reference to the function.
Constructing one from an r-value is possible but results in a dangling reference later on.
use case:
template< class GridPart >
auto initialData( const GridPart& gridPart )
{
return gridFunctionAdapter( InstationaryFunction( ExactSolution(), 0.0 ), gridPart );
}
Edited by Andreas Dedner