DUNE-ACFEM (unstable)

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

Restriction to index sub-space with run-time dynamic pivot indices. More...

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

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

Public Member Functions

template<class Arg , class T , std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&size< T >()==sizeof...(IndexPositions) &&IsIntegralTuple< T >::value), int > = 0>
 Restriction (Arg &&host, const T &tuple)
 Constructor from a given tuple-like index collection. More...
 
template<class Arg , class T , std::size_t N, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&(N==sizeof...(IndexPositions)||N==0) &&std::is_integral< T >::value), int > = 0>
 Restriction (Arg &&host, const T(&t)[N])
 Constructor from a given C-array index collection. More...
 
template<class Arg , class T , std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&size< T >()==0 &&IsIntegralTuple< T >::value), int > = 0>
 Restriction (Arg &&host, T &&tuple)
 Constructor from emtpy tuple like.
 
template<class Arg , class... Indices, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&sizeof...(Indices) !=0 &&sizeof...(Indices)==sizeof...(IndexPositions) &&IsIntegralPack< Indices... >::value), int > = 0>
 Restriction (Arg &&host, Indices... indices)
 Constructor from a given index pack of lookAt() indices. More...
 
template<class Arg , std::size_t... Pivots, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&sizeof...(Pivots) !=0), int > = 0>
 Restriction (Arg &&host, IndexSequence< Pivots... >)
 Constructor from a given index sequence. More...
 
template<class Arg , std::enable_if_t< std::is_constructible< ArgType, Arg >::value, int > = 0>
 Restriction (ArgType &&host, Seq<>=Seq<>{})
 Constructor from a given host-tensor, looking at the sub-tensor at (0, ...).
 
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[].
 
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<class... Indices, std::enable_if_t<((sizeof...(Indices) > 0) &&IsIntegralPack< Indices... >::value), int > = 0>
void lookAt (Indices... indices)
 "Move" the view to the given index pack. More...
 
template<class T , std::enable_if_t<(IsTupleLike< T >::value), int > = 0>
void lookAt (T &&tuple)
 "Move" the view to the given index tuple. More...
 
const auto & lookAt () const
 Return the array of indices currently looking at.
 
auto & lookAt ()
 Return the array of indices currently looking at.
 
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 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>
class Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >

Restriction to index sub-space with run-time dynamic 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 2, 22:35, 2024)