SimiLie
Loading...
Searching...
No Matches
sil::tensor::TensorScalingIndex< TensorIndex > Struct Template Reference

Store a scalar multiple of the identity using one coefficient. More...

#include <scaling_tensor.hpp>

Collaboration diagram for sil::tensor::TensorScalingIndex< TensorIndex >:
Collaboration graph

Public Types

using subindices_domain_t = ddc::DiscreteDomain<TensorIndex...>
 

Static Public Member Functions

static KOKKOS_FUNCTION constexpr subindices_domain_t subindices_domain ()
 
static constexpr std::size_t rank ()
 
static constexpr std::size_t size ()
 
static constexpr std::size_t mem_size ()
 
static constexpr std::size_t access_size ()
 
static KOKKOS_FUNCTION constexpr std::size_t mem_id (std::array< std::size_t, sizeof...(TensorIndex)> const &natural_ids)
 
static KOKKOS_FUNCTION constexpr std::size_t access_id (std::array< std::size_t, sizeof...(TensorIndex)> const &natural_ids)
 
static KOKKOS_FUNCTION constexpr std::size_t access_id_to_mem_id (std::size_t access_id)
 
template<class Tensor , class Elem , class Id , class FunctorType >
static KOKKOS_FUNCTION constexpr Tensor::element_type process_access (const FunctorType &access, Tensor const &tensor, Elem const &elem)
 
static KOKKOS_FUNCTION constexpr std::array< std::size_t, rank()> mem_id_to_canonical_natural_ids (std::size_t mem_id)
 

Static Public Attributes

static constexpr bool is_tensor_index = true
 
static constexpr bool is_explicitely_stored_tensor = true
 

Detailed Description

template<TensorNatIndex... TensorIndex>
struct sil::tensor::TensorScalingIndex< TensorIndex >

Store a scalar multiple of the identity using one coefficient.

For a matrix, this represents \(A_{ij} = \alpha\delta_{ij}\): every diagonal entry equals the stored value, and every off-diagonal entry is zero. All index dimensions must have the same size. For higher ranks, an entry equals the stored value when all its natural indices agree, and zero otherwise.

Important
This documentation is fully AI-generated.

Definition at line 23 of file scaling_tensor.hpp.

Member Typedef Documentation

◆ subindices_domain_t

template<TensorNatIndex... TensorIndex>
using sil::tensor::TensorScalingIndex< TensorIndex >::subindices_domain_t = ddc::DiscreteDomain<TensorIndex...>

Definition at line 33 of file scaling_tensor.hpp.

Member Function Documentation

◆ subindices_domain()

template<TensorNatIndex... TensorIndex>
static KOKKOS_FUNCTION constexpr subindices_domain_t sil::tensor::TensorScalingIndex< TensorIndex >::subindices_domain ( )
inlinestaticconstexpr

Definition at line 35 of file scaling_tensor.hpp.

◆ rank()

template<TensorNatIndex... TensorIndex>
static constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::rank ( )
inlinestaticconstexpr

Definition at line 43 of file scaling_tensor.hpp.

◆ size()

template<TensorNatIndex... TensorIndex>
static constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::size ( )
inlinestaticconstexpr

Definition at line 48 of file scaling_tensor.hpp.

◆ mem_size()

template<TensorNatIndex... TensorIndex>
static constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::mem_size ( )
inlinestaticconstexpr

Definition at line 53 of file scaling_tensor.hpp.

◆ access_size()

template<TensorNatIndex... TensorIndex>
static constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::access_size ( )
inlinestaticconstexpr

Definition at line 58 of file scaling_tensor.hpp.

◆ mem_id()

template<TensorNatIndex... TensorIndex>
static KOKKOS_FUNCTION constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::mem_id ( std::array< std::size_t, sizeof...(TensorIndex)> const & natural_ids)
inlinestaticconstexpr

Definition at line 63 of file scaling_tensor.hpp.

◆ access_id()

template<TensorNatIndex... TensorIndex>
static KOKKOS_FUNCTION constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::access_id ( std::array< std::size_t, sizeof...(TensorIndex)> const & natural_ids)
inlinestaticconstexpr

Definition at line 72 of file scaling_tensor.hpp.

◆ access_id_to_mem_id()

template<TensorNatIndex... TensorIndex>
static KOKKOS_FUNCTION constexpr std::size_t sil::tensor::TensorScalingIndex< TensorIndex >::access_id_to_mem_id ( std::size_t access_id)
inlinestaticconstexpr

Definition at line 84 of file scaling_tensor.hpp.

◆ process_access()

template<TensorNatIndex... TensorIndex>
template<class Tensor , class Elem , class Id , class FunctorType >
static KOKKOS_FUNCTION constexpr Tensor::element_type sil::tensor::TensorScalingIndex< TensorIndex >::process_access ( const FunctorType & access,
Tensor const & tensor,
Elem const & elem )
inlinestaticconstexpr

Definition at line 91 of file scaling_tensor.hpp.

◆ mem_id_to_canonical_natural_ids()

template<TensorNatIndex... TensorIndex>
static KOKKOS_FUNCTION constexpr std::array< std::size_t, rank()> sil::tensor::TensorScalingIndex< TensorIndex >::mem_id_to_canonical_natural_ids ( std::size_t mem_id)
inlinestaticconstexpr

Definition at line 104 of file scaling_tensor.hpp.

Member Data Documentation

◆ is_tensor_index

template<TensorNatIndex... TensorIndex>
bool sil::tensor::TensorScalingIndex< TensorIndex >::is_tensor_index = true
staticconstexpr

Definition at line 30 of file scaling_tensor.hpp.

◆ is_explicitely_stored_tensor

template<TensorNatIndex... TensorIndex>
bool sil::tensor::TensorScalingIndex< TensorIndex >::is_explicitely_stored_tensor = true
staticconstexpr

Definition at line 31 of file scaling_tensor.hpp.


The documentation for this struct was generated from the following file: