SpECTRE  2021.08.02
TensorExpressions::SquareRoot< T > Struct Template Reference

Defines the tensor expression representing the square root of a tensor expression that evaluates to a rank 0 tensor. More...

#include <SquareRoot.hpp>

Public Types

using type = typename T::type
 
using symmetry = tmpl::list<>
 
using index_list = tmpl::list<>
 
using args_list = tmpl::list<>
 

Public Member Functions

 SquareRoot (T t)
 
template<typename... TensorIndices, Requires< sizeof...(TensorIndices)==0 > = nullptr>
decltype(auto) get (const std::array< size_t, 0 > &multi_index) const noexcept
 Returns the square root of the component of the tensor evaluated from the RHS tensor expression. More...
 

Static Public Attributes

static constexpr auto num_tensor_indices = 0
 

Detailed Description

template<typename T>
struct TensorExpressions::SquareRoot< T >

Defines the tensor expression representing the square root of a tensor expression that evaluates to a rank 0 tensor.

Template Parameters
Tthe type of the tensor expression of which to take the square root

Member Function Documentation

◆ get()

template<typename T >
template<typename... TensorIndices, Requires< sizeof...(TensorIndices)==0 > = nullptr>
decltype(auto) TensorExpressions::SquareRoot< T >::get ( const std::array< size_t, 0 > &  multi_index) const
inlinenoexcept

Returns the square root of the component of the tensor evaluated from the RHS tensor expression.

Details

SquareRoot only supports tensor expressions that evaluate to a rank 0 Tensor. This is why this template is only defined for the case where TensorIndices is empty.

Template Parameters
TensorIndicesthe TensorIndexs of the LHS tensor and RHS tensor expression
Parameters
multi_indexthe multi-index of the component of which to take the square root

Returns: the square root of the component of the tensor evaluated from the RHS tensor expression