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<V, GV, r, rC, F, AssemblyGridView> : 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

Method Dune::GDT::VectorBasedFunctional::copy

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
typename BaseWalkerType::BaseType *Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::copy() override

No documentation provided.

Method Dune::GDT::VectorBasedFunctional::vector

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
SourceVectorType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::vector()

No documentation provided.

Method Dune::GDT::VectorBasedFunctional::append

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
ThisType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::append(const LocalElementFunctionalInterface<ElementType, r, rC, F, DofFieldType> &local_functional, const XT::Common::Parameter &param, const ElementFilterType &filter = ApplyOnAllElements())

No documentation provided.

Method Dune::GDT::VectorBasedFunctional::append

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
ThisType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::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.

Method Dune::GDT::VectorBasedFunctional::append

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
ThisType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::append(const LocalIntersectionFunctionalInterface<IntersectionType, r, rC, F, DofFieldType> &local_functional, const XT::Common::Parameter &param, const IntersectionFilterType &filter = ApplyOnAllIntersections())

No documentation provided.

Method Dune::GDT::VectorBasedFunctional::append

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
ThisType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::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.

Method Dune::GDT::VectorBasedFunctional::append

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
ThisType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::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

Method Dune::GDT::VectorBasedFunctional::append

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
ThisType &Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::append(const std::tuple<const LocalIntersectionFunctionalInterface<IntersectionType, r, rC, F, DofFieldType>&, const XT::Common::Parameter&, const IntersectionFilterType&> &functional_param_filter_tuple)

No documentation provided.

Method Dune::GDT::VectorBasedFunctional::assemble

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
void Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::assemble(const bool use_tbb = false) final override

\ }

Constructor Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>

template<>
template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::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.

Constructor Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>

template<>
template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::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()).

Constructor Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>

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

No documentation provided.

Constructor Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>

template<>
template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::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.

Constructor Dune::GDT::VectorBasedFunctional::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>

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

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::ThisType

type Dune::GDT::VectorBasedFunctional::ThisType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::VectorStorage

type Dune::GDT::VectorBasedFunctional::VectorStorage

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::BaseFunctionalType

type Dune::GDT::VectorBasedFunctional::BaseFunctionalType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::BaseWalkerType

type Dune::GDT::VectorBasedFunctional::BaseWalkerType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::AssemblyGridViewType

type Dune::GDT::VectorBasedFunctional::AssemblyGridViewType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::DofFieldType

type Dune::GDT::VectorBasedFunctional::DofFieldType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::ElementFilterType

type Dune::GDT::VectorBasedFunctional::ElementFilterType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::IntersectionFilterType

type Dune::GDT::VectorBasedFunctional::IntersectionFilterType

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::ApplyOnAllElements

type Dune::GDT::VectorBasedFunctional::ApplyOnAllElements

No documentation provided.

Type alias Dune::GDT::VectorBasedFunctional::ApplyOnAllIntersections

type Dune::GDT::VectorBasedFunctional::ApplyOnAllIntersections

No documentation provided.

Function template Dune::GDT::VectorBasedFunctional::assemble_range

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
template<class EntityRange>
void Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::assemble_range(const EntityRange &entity_range)

No documentation provided.