Function Dune::GDT::default_interpolation

Function template Dune::GDT::default_interpolation

template<class GV, size_t r, size_t rC, class R, class V, class IGVT>
std::enable_if_t<std::is_same<XT::Grid::extract_entity_t<GV>, typename IGVT::Grid::template Codim<0>::Entity>::value, void> Dune::GDT::default_interpolation(const XT::Functions::FunctionInterface<GridView<IGVT>::dimension, r, rC, R> &source, DiscreteFunction<V, GV, r, rC, R> &target, const GridView<IGVT> &interpolation_grid_view, const XT::Common::Parameter &param = {})

Interpolates a function within a given space [most general variant].

Simply calls make_grid_function and redirects to the appropriate default_interpolation() function.

Function template Dune::GDT::default_interpolation

template<class GV, size_t r, size_t rC, class R, class V, class IGVT>
std::enable_if_t<std::is_same<XT::Grid::extract_entity_t<GV>, typename IGVT::Grid::template Codim<0>::Entity>::value, void> Dune::GDT::default_interpolation(const XT::Functions::GridFunctionInterface<XT::Grid::extract_entity_t<GV>, r, rC, R> &source, DiscreteFunction<V, GV, r, rC, R> &target, const GridView<IGVT> &interpolation_grid_view, const XT::Common::Parameter &param = {})

Interpolates a grid function within a given space [most general variant].

Simply uses interpolate() of the target spaces global basis().

Note

This does not clear target.dofs().vector(). Thus, if interpolation_grid_view only covers a part of the domain of target.space().grid_view(), other contributions in target remain (which is on purpose).

Note

This might not be optimal for all spaces. For instance, the polynomial order of source is not taken into account for local L^2-projection based interpolation. This is a limitation in dune-localfunctions and we need to completely replace the interpolation of the respective local finite element.

Note

This might not be correct for all spaces, in particular if source is not continuous.

Function template Dune::GDT::default_interpolation

template<class GV, size_t r, size_t rC, class R, class V, class IGVT>
std::enable_if_t<std::is_same<XT::Grid::extract_entity_t<GV>, typename IGVT::Grid::template Codim<0>::Entity>::value, void> Dune::GDT::default_interpolation(const int source_order, const std::function<typename XT::Functions::GenericFunction<GridView<IGVT>::dimension, r, rC, R>::RangeReturnType(const typename XT::Functions::GenericFunction<GridView<IGVT>::dimension, r, rC, R>::DomainType&, const XT::Common::Parameter&)> source_evaluate_lambda, DiscreteFunction<V, GV, r, rC, R> &target, const GridView<IGVT> &interpolation_grid_view, const XT::Common::Parameter &param = {})

Interpolates a function given as a lambda expression within a given space [most general variant].

Simply creates a XT::Functions::GenericFunction and redirects to the appropriate default_interpolation() function.

Function template Dune::GDT::default_interpolation

template<class GV, size_t r, size_t rC, class R, class V>
void Dune::GDT::default_interpolation(const XT::Functions::FunctionInterface<GV::dimension, r, rC, R> &source, DiscreteFunction<V, GV, r, rC, R> &target, const XT::Common::Parameter &param = {})

Interpolates a function within a given space [uses target.space().grid_view() as interpolation_grid_view].

Function template Dune::GDT::default_interpolation

template<class GV, size_t r, size_t rC, class R, class V>
void Dune::GDT::default_interpolation(const XT::Functions::GridFunctionInterface<XT::Grid::extract_entity_t<GV>, r, rC, R> &source, DiscreteFunction<V, GV, r, rC, R> &target, const XT::Common::Parameter &param = {})

Interpolates a grid function within a given space [uses target.space().grid_view() as interpolation_grid_view].

Function template Dune::GDT::default_interpolation

template<class GV, size_t r, size_t rC, class R, class V>
void Dune::GDT::default_interpolation(const int source_order, const std::function<typename XT::Functions::GenericFunction<GV::dimension, r, rC, R>::RangeReturnType(const typename XT::Functions::GenericFunction<GV::dimension, r, rC, R>::DomainType&, const XT::Common::Parameter&)> source_evaluate_lambda, DiscreteFunction<V, GV, r, rC, R> &target, const XT::Common::Parameter &param = {})

Interpolates a function given as a lambda expression within a given space [uses target.space().grid_view() as interpolation_grid_view].

Function template Dune::GDT::default_interpolation

template<class VectorType, class GV, size_t r, size_t rC, class R, class IGVT>
std::enable_if_t<XT::LA::is_vector<VectorType>::value && std::is_same<XT::Grid::extract_entity_t<GV>, typename IGVT::Grid::template Codim<0>::Entity>::value, DiscreteFunction<VectorType, GV, r, rC, R>> Dune::GDT::default_interpolation(const XT::Functions::FunctionInterface<GridView<IGVT>::dimension, r, rC, R> &source, const SpaceInterface<GV, r, rC, R> &target_space, const GridView<IGVT> &interpolation_grid_view, const XT::Common::Parameter &param = {})

Interpolates a function within a given space [creates a suitable target function].

Function template Dune::GDT::default_interpolation

template<class VectorType, class GV, size_t r, size_t rC, class R, class IGVT>
std::enable_if_t<XT::LA::is_vector<VectorType>::value && std::is_same<XT::Grid::extract_entity_t<GV>, typename IGVT::Grid::template Codim<0>::Entity>::value, DiscreteFunction<VectorType, GV, r, rC, R>> Dune::GDT::default_interpolation(const XT::Functions::GridFunctionInterface<XT::Grid::extract_entity_t<GV>, r, rC, R> &source, const SpaceInterface<GV, r, rC, R> &target_space, const GridView<IGVT> &interpolation_grid_view, const XT::Common::Parameter &param = {})

Interpolates a grid function within a given space [creates a suitable target function].

Function template Dune::GDT::default_interpolation

template<class VectorType, class GV, size_t r, size_t rC, class R, class IGVT>
std::enable_if_t<XT::LA::is_vector<VectorType>::value && std::is_same<XT::Grid::extract_entity_t<GV>, typename IGVT::Grid::template Codim<0>::Entity>::value, DiscreteFunction<VectorType, GV, r, rC, R>> Dune::GDT::default_interpolation(const int source_order, const std::function<typename XT::Functions::GenericFunction<GridView<IGVT>::dimension, r, rC, R>::RangeReturnType(const typename XT::Functions::GenericFunction<GridView<IGVT>::dimension, r, rC, R>::DomainType&, const XT::Common::Parameter&)> source_evaluate_lambda, const SpaceInterface<GV, r, rC, R> &target_space, const GridView<IGVT> &interpolation_grid_view, const XT::Common::Parameter &param = {})

Interpolates a function given as a lambda expression within a given space [creates a suitable target function].

Function template Dune::GDT::default_interpolation

template<class VectorType, class GV, size_t r, size_t rC, class R>
std::enable_if_t<XT::LA::is_vector<VectorType>::value, DiscreteFunction<VectorType, GV, r, rC, R>> Dune::GDT::default_interpolation(const XT::Functions::FunctionInterface<GV::dimension, r, rC, R> &source, const SpaceInterface<GV, r, rC, R> &target_space, const XT::Common::Parameter &param = {})

Interpolates a function within a given space [creates a suitable target function, uses target_space.grid_view() as interpolation_grid_view].

Function template Dune::GDT::default_interpolation

template<class VectorType, class GV, size_t r, size_t rC, class R>
std::enable_if_t<XT::LA::is_vector<VectorType>::value, DiscreteFunction<VectorType, GV, r, rC, R>> Dune::GDT::default_interpolation(const XT::Functions::GridFunctionInterface<XT::Grid::extract_entity_t<GV>, r, rC, R> &source, const SpaceInterface<GV, r, rC, R> &target_space, const XT::Common::Parameter &param = {})

Interpolates a grid function within a given space [creates a suitable target function, uses target_space.grid_view() as interpolation_grid_view].

Function template Dune::GDT::default_interpolation

template<class VectorType, class GV, size_t r, size_t rC, class R>
std::enable_if_t<XT::LA::is_vector<VectorType>::value, DiscreteFunction<VectorType, GV, r, rC, R>> Dune::GDT::default_interpolation(const int source_order, const std::function<typename XT::Functions::GenericFunction<GV::dimension, r, rC, R>::RangeReturnType(const typename XT::Functions::GenericFunction<GV::dimension, r, rC, R>::DomainType&, const XT::Common::Parameter&)> source_evaluate_lambda, const SpaceInterface<GV, r, rC, R> &target_space, const XT::Common::Parameter &param = {})

Interpolates a function given as a lambda expression within a given space [creates a suitable target function, uses target_space.grid_view() as interpolation_grid_view].