DUNE-ACFEM (unstable)

Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field > Class Template Reference

"Kronecker" tensor: evaluates to 1 for exactly one tuple of indices. More...

#include <dune/acfem/tensors/modules/kronecker.hh>

+ Collaboration diagram for Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >:

Public Member Functions

template<class T , std::enable_if_t<(IsTupleLike< T >::value &&size< T >()==rank &&IsIntegralTuple< T >::value), int > = 0>
 KroneckerDelta (T &&tuple)
 Constructor from a given tuple-like index collection. More...
 
template<class... Indices, std::enable_if_t<(sizeof...(Indices) !=0 &&sizeof...(Indices)==rank &&IsIntegralPack< Indices... >::value), int > = 0>
 KroneckerDelta (Indices... indices)
 Constructor from a given index pack of lookAt() indices. More...
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
FieldType 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) operator() (Seq< Indices... >) const
 Constant access from index-sequence. More...
 
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" pivot index to the specified values. More...
 
const std::array< std::size_t, rank > & lookAt () const &
 Return the array of indices currently looking at.
 

Detailed Description

template<class Field, std::size_t D0, std::size_t... RestDims>
class Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >

"Kronecker" tensor: evaluates to 1 for exactly one tuple of indices.

Dynamic version with runtim pivot indices.

Constructor & Destructor Documentation

◆ KroneckerDelta() [1/2]

template<class Field , std::size_t D0, std::size_t... RestDims>
template<class T , std::enable_if_t<(IsTupleLike< T >::value &&size< T >()==rank &&IsIntegralTuple< T >::value), int > = 0>
Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >::KroneckerDelta ( T &&  tuple)
inline

Constructor from a given tuple-like index collection.

Parameters
[in]hostThe host tensor providing the data.
[in]tupleA tuple-like index collection defining the sub-tensor to lookAt(). The size of the tuple must match the number of "defect" indices.

◆ KroneckerDelta() [2/2]

template<class Field , std::size_t D0, std::size_t... RestDims>
template<class... Indices, std::enable_if_t<(sizeof...(Indices) !=0 &&sizeof...(Indices)==rank &&IsIntegralPack< Indices... >::value), int > = 0>
Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >::KroneckerDelta ( Indices...  indices)
inline

Constructor from a given index pack of lookAt() indices.

Parameters
[in]hostThe host tensor providing the data.
[in]indicesA pack of indices defining the pivot index for the Kronecker delta.

Member Function Documentation

◆ lookAt() [1/2]

template<class Field , std::size_t D0, std::size_t... RestDims>
template<class... Indices, std::enable_if_t<((sizeof...(Indices) > 0) &&IsIntegralPack< Indices... >::value), int > = 0>
void Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >::lookAt ( Indices...  indices)
inline

"Move" the view to the given index pack.

Parameters
[in]indicesThe index of the sub-tensor to look at.

◆ lookAt() [2/2]

template<class Field , std::size_t D0, std::size_t... RestDims>
template<class T , std::enable_if_t<(IsTupleLike< T >::value), int > = 0>
void Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >::lookAt ( T &&  tuple)
inline

"Move" pivot index to the specified values.

Parameters
[in]tupleA tuple or array of indices, actually everything for which ACFem::IsTupleLike return true.

References Dune::ACFem::assign().

◆ operator()()

template<class Field , std::size_t D0, std::size_t... RestDims>
template<std::size_t... Indices, std::enable_if_t< sizeof...(Indices)==rank, int > = 0>
decltype(auto) Dune::ACFem::Tensor::KroneckerDelta< Seq< D0, RestDims... >, Seq<>, Field >::operator() ( Seq< Indices... >  ) const
inline

Constant access from index-sequence.

The runtime dyncamic version cannot optimize this.


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 12, 22:29, 2024)