Class template Dune::GDT::VectorBasedFunctional

Inherits from Dune::XT::Common::StorageProvider, Dune::GDT::ConstVectorBasedFunctional, Dune::XT::Grid::Walker.

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
class Dune::GDT::VectorBasedFunctional : private XT::Common::StorageProvider<V>, public ConstVectorBasedFunctional<V, GV, r, rC, F>, public XT::Grid::Walker<AssemblyGridView>

Base class for linear functionals which are assembled into a vector.

We derive from the XT::Grid::Walker and povide custom append() methods to allow to add local element and intersection functionals. We already hold the target vector (or create one of appropriate size), into which we want to assemble. The functional is assembled by walking over the given assembly_gid_view (which defaults to the one fom the given space). This allows to assemble a functional only on a smaller grid view than the one given from the space (similar functionality could be acchieved by appending this functional to another walker and by providing an appropriate filter).

Note

For convenience, we use the same type of vector to assemble this functional into, that we use to model the source (see the documentation in FunctionalInterface), although other choices are in general conceivable.

Note

See ConstVectorBasedFunctional and FunctionalInterface for a description of the template arguments.

See also: ConstVectorBasedFunctional, FunctionalInterface, XT::Grid::Walker

typename BaseWalkerType::BaseType *Dune::GDT::VectorBasedFunctional::copy() override

No documentation provided.

SourceVectorType &Dune::GDT::VectorBasedFunctional::vector()

No documentation provided.

ThisType &Dune::GDT::VectorBasedFunctional::append(const LocalElementFunctionalInterface<ElementType, r, rC, F, DofFieldType> &local_functional, const XT::Common::Parameter &param = <recovery-expr>({}), const ElementFilterType &filter = ApplyOnAllElements())

No documentation provided.

ThisType &Dune::GDT::VectorBasedFunctional::append(const LocalElementFunctionalInterface<ElementType, r, rC, F, DofFieldType> &local_functional, const XT::Common::Parameter &param, std::function<bool(const AssemblyGridViewType&, const ElementType&)> filter_lambda)

No documentation provided.

ThisType &Dune::GDT::VectorBasedFunctional::append(const LocalIntersectionFunctionalInterface<IntersectionType, r, rC, F, DofFieldType> &local_functional, const XT::Common::Parameter &param = <recovery-expr>({}), const IntersectionFilterType &filter = ApplyOnAllIntersections())

No documentation provided.

ThisType &Dune::GDT::VectorBasedFunctional::append(const LocalIntersectionFunctionalInterface<IntersectionType, r, rC, F, DofFieldType> &local_functional, const XT::Common::Parameter &param, std::function<bool(const AssemblyGridViewType&, const IntersectionType&)> filter_lambda)

No documentation provided.

ThisType &Dune::GDT::VectorBasedFunctional::append(const std::tuple<const LocalElementFunctionalInterface<ElementType, r, rC, F, DofFieldType>&, const XT::Common::Parameter&, const ElementFilterType&> &functional_param_filter_tuple)

\ {

Variants to simplify Python bindings

ThisType &Dune::GDT::VectorBasedFunctional::append(const std::tuple<const LocalIntersectionFunctionalInterface<IntersectionType, r, rC, F, DofFieldType>&, const XT::Common::Parameter&, const IntersectionFilterType&> &functional_param_filter_tuple)

No documentation provided.

void Dune::GDT::VectorBasedFunctional::assemble(const bool use_tbb = false) final override

\ }

template<>
Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>(AssemblyGridViewType assembly_grid_view, const SourceSpaceType &source_spc, SourceVectorType &vec)

Ctors which accepts an existing vector into which to assemble.

template<>
Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>(AssemblyGridViewType assembly_grid_view, const SourceSpaceType &source_spc)

Ctor which creates an appropriate vector into which to assemble (which is accessible via vector()).

template<>
Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>(const ThisType&) = delete

No documentation provided.

template<>
Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>(ThisType &other)

Performs something like a shallow copy, as required by Dune::XT::Grid::ElementAndIntersectionFunctor, i.e. the copied functional shares the vector.

template<>
Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>(ThisType&&) noexcept = default

No documentation provided.

type Dune::GDT::VectorBasedFunctional::ThisType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::VectorStorage

No documentation provided.

type Dune::GDT::VectorBasedFunctional::BaseFunctionalType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::BaseWalkerType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::AssemblyGridViewType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::DofFieldType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::ElementFilterType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::IntersectionFilterType

No documentation provided.

type Dune::GDT::VectorBasedFunctional::ApplyOnAllElements

No documentation provided.

type Dune::GDT::VectorBasedFunctional::ApplyOnAllIntersections

No documentation provided.

template<class EntityRange>
void Dune::GDT::VectorBasedFunctional::assemble_range(const EntityRange &entity_range)

No documentation provided.