v0.14.0
Public Member Functions | List of all members
FTensor::Kronecker_Delta< T > Class Template Reference

Kronecker Delta class. More...

#include <src/ftensor/src/FTensor/Kronecker_Delta.hpp>

Public Member Functions

constexpr T operator() (const int N1, const int N2) const
 
template<char i, char j, int Dim0, int Dim1>
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, joperator() (const Index< i, Dim0 > &, const Index< j, Dim1 > &) const
 
template<char i, int Dim0>
constexpr auto operator() (const Index< i, Dim0 > &, const int &N1) const
 
template<char j, int Dim1>
constexpr auto operator() (const int &N0, const Index< j, Dim1 > &) const
 

Detailed Description

template<class T = int>
class FTensor::Kronecker_Delta< T >

Kronecker Delta class.

Template Parameters
int
Examples
approx_sphere.cpp, ContactOps.hpp, dynamic_first_order_con_law.cpp, EshelbianOperators.cpp, matrix_function.cpp, NeoHookean.hpp, PlasticOpsLargeStrains.hpp, PlasticOpsSmallStrains.hpp, shallow_wave.cpp, and ThermoElasticOps.hpp.

Definition at line 15 of file Kronecker_Delta.hpp.

Member Function Documentation

◆ operator()() [1/4]

template<class T = int>
template<char i, char j, int Dim0, int Dim1>
Tensor2_Expr<Kronecker_Delta<T>, T, Dim0, Dim1, i, j> FTensor::Kronecker_Delta< T >::operator() ( const Index< i, Dim0 > &  ,
const Index< j, Dim1 > &   
) const
inline

Definition at line 23 of file Kronecker_Delta.hpp.

23  {
24  return Tensor2_Expr<Kronecker_Delta<T>, T, Dim0, Dim1, i, j>(*this);
25  };

◆ operator()() [2/4]

template<class T = int>
template<char i, int Dim0>
constexpr auto FTensor::Kronecker_Delta< T >::operator() ( const Index< i, Dim0 > &  ,
const int &  N1 
) const
inlineconstexpr

Definition at line 28 of file Kronecker_Delta.hpp.

28  {
29  auto TensorExpr = [this, N1](const int &N0) {
30  return this->operator()(N0, N1);
31  };
33  };

◆ operator()() [3/4]

template<class T = int>
template<char j, int Dim1>
constexpr auto FTensor::Kronecker_Delta< T >::operator() ( const int &  N0,
const Index< j, Dim1 > &   
) const
inlineconstexpr

Definition at line 36 of file Kronecker_Delta.hpp.

36  {
37  auto TensorExpr = [this, N0](const int &N1) {
38  return this->operator()(N0, N1);
39  };
40  return Tensor1_Expr<decltype(TensorExpr), T, Dim1, j>{TensorExpr};
41  };

◆ operator()() [4/4]

template<class T = int>
constexpr T FTensor::Kronecker_Delta< T >::operator() ( const int  N1,
const int  N2 
) const
inlineconstexpr

Definition at line 17 of file Kronecker_Delta.hpp.

17  {
18  return (N1 == N2) ? T(1) : T(0);
19  }

The documentation for this class was generated from the following file:
FTensor::Kronecker_Delta::operator()
constexpr T operator()(const int N1, const int N2) const
Definition: Kronecker_Delta.hpp:17
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
Tensor1_Expr
Definition: single.cpp:11
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19