DUNE-ACFEM (unstable)

Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > > Class Template Reference

Restriction to index sub-space with compile-time constant pivot indices. More...

#include <dune/acfem/tensors/operations/restriction.hh>

+ Collaboration diagram for Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >:

Public Member Functions

template<class Arg , std::enable_if_t< std::is_constructible< ArgType, Arg >::value, int > = 0>
 Restriction (Arg &&host, PivotSequence=PivotSequence{})
 Constructor from a given host-tensor, looking at the pivot indices specified by the template argument.
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< ArgType >::value), int > = 0>
 Restriction (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
auto operator[] (std::size_t i)
 Implement kind of a nested vector interface via operator[].
 
auto operator[] (std::size_t i) const
 Implement kind of a nested vector interface via operator[]. More...
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) operator() (Dims... indices)
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) operator() (Dims... indices) const
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank), int > = 0>
decltype(auto) constexpr operator() (Seq< Indices... >)
 Constant access from index-sequence.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank), int > = 0>
decltype(auto) constexpr operator() (Seq< Indices... >) const
 Constant access from index-sequence.
 
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0>
OperandType< I > && operand (IndexConstant< I >=IndexConstant< I >{}) &&
 Return one of the stored operands in an rvalue context. More...
 
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0>
decltype(auto) operand (IndexConstant< I >=IndexConstant< I >{}) &
 Return one of the stored operands in a mutable reference context. More...
 
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0>
decltype(auto) operand (IndexConstant< I >=IndexConstant< I >{}) const &
 Return one of the stored operands in a const reference context. More...
 

Static Public Member Functions

static constexpr auto lookAt ()
 Return the array of indices currently looking at.
 

Static Public Attributes

template<std::size_t I>
static constexpr bool emitByValue_ = EmitByValueV<OperandType<I> >
 Force some things to always be emitted as non-references.
 

Detailed Description

template<class Tensor, std::size_t... IndexPositions, std::size_t... PivotIndices>
class Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >

Restriction to index sub-space with compile-time constant pivot indices.

Member Function Documentation

◆ operand() [1/3]

template<class F , class... T>
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0>
decltype(auto) Dune::ACFem::Expressions::Storage< F, T >::operand ( IndexConstant< I >  = IndexConstant<I>{}) &
inlineinherited

Return one of the stored operands in a mutable reference context.

In this case we assume that it is safe to return a reference as the storage container should be alive in a real object.

As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.

◆ operand() [2/3]

template<class F , class... T>
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0>
OperandType<I>&& Dune::ACFem::Expressions::Storage< F, T >::operand ( IndexConstant< I >  = IndexConstant<I>{}) &&
inlineinherited

Return one of the stored operands in an rvalue context.

In this case exactly the contained type is returned, i.e. a copy for objects or a reference for references.

As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.

◆ operand() [3/3]

template<class F , class... T>
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0>
decltype(auto) Dune::ACFem::Expressions::Storage< F, T >::operand ( IndexConstant< I >  = IndexConstant<I>{}) const &
inlineinherited

Return one of the stored operands in a const reference context.

In this case we assume that it is safe to return a reference as the storage container should be alive in a real object.

As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 1, 22:29, 2024)