-
- Downloads
Add some utilitilies for unified treatment of grid functions
All utilities in this header are for transitional purposes to migrate dune-fufem from the `Dune::VirtualFunction`-based to a `std::function`-based interface, while keeping some compatibility. Unfortunately the dune-functions utilities (e.g. `makeGridViewFunction()`) cannot directly be used, because the old dune-fufem assemblers do not know a `GridView`, but only a `Grid`, while the dune-functions grid-function concept always required an `EntitySet` that typically represents a `GridView`. The work-around provided by this header works as follows: * Provide a utility `Dune::Fufem::Impl::localFunctionForGrid<Grid>(f)` that creates a local function suitable for a given `Grid` type - either by forwarding to `localFunction(f)` or by providing a wrapper. * To avoid implementing the wrapper again, `Dune::Functions::AnalyticGridViewFunction` is reused with a dummy `Dune::Fufem::Impl::AllEntityGridView` that contains all entities (but does not allow iteration or to obtain an index set). * Since the `GridView` type may differ, depending on which code path is used to create the grid function, we cannot directly store the global grid function in a `Dune::Functions::GridFunction` type-erasure wrapper. Instead we have to store the local function in a `Dune::Functions::LocalFunction` that only depends on the entity type. Since creating precise type of the latter from the `Grid` and `Range` is a little cumbersome, this is simplified by the alias `Dune::Fufem::Impl::LocalFunctionInterfaceForGrid<Grid,Range>`.
parent
3299eead
No related branches found
No related tags found
dune/fufem/functions/gridfunctionhelper.hh
0 → 100644
Please register or sign in to comment