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

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

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(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

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(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

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(const ThisType&) = delete

No documentation provided.

Constructor Dune::GDT::VectorBasedFunctional::VectorBasedFunctional

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(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

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(ThisType&&) noexcept = default

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::ThisType = VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::VectorStorage = XT::Common::StorageProvider<V>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::BaseFunctionalType = ConstVectorBasedFunctional<V, GV, r, rC, F>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::BaseWalkerType = XT::Grid::Walker<AssemblyGridView>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::AssemblyGridViewType = AssemblyGridView

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::DofFieldType = typename V::ScalarType

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::ElementFilterType = XT::Grid::ElementFilter<AssemblyGridViewType>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::IntersectionFilterType = XT::Grid::IntersectionFilter<AssemblyGridViewType>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::ApplyOnAllElements = XT::Grid::ApplyOn::AllElements<AssemblyGridViewType>

No documentation provided.

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

template<class V, class GV, size_t r = 1, size_t rC = 1, class F = double, class AssemblyGridView = GV>
using Dune::GDT::VectorBasedFunctional<V, GV, r, rC, F, AssemblyGridView>::ApplyOnAllIntersections = XT::Grid::ApplyOn::AllIntersections<AssemblyGridViewType>

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.