Namespaces | Typedefs | Enumerations | Functions | Variables
MarmotFastorTensorBasics.h File Reference
#include "Eigen/Core"
#include "Fastor/Fastor.h"
#include "Marmot/MarmotTensor.h"
#include <autodiff/forward/dual/dual.hpp>
Include dependency graph for MarmotFastorTensorBasics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Marmot
 This file includes functions needed for calculations with stress and strain tensors written in voigt notation.
 
 Marmot::FastorStandardTensors
 
 Marmot::FastorStandardTensors::Spatial3D
 
 Marmot::FastorIndices
 

Typedefs

using Marmot::FastorStandardTensors::Tensor3d = Fastor::Tensor< double, 3 >
 
using Marmot::FastorStandardTensors::Tensor33d = Fastor::Tensor< double, 3, 3 >
 
using Marmot::FastorStandardTensors::Tensor333d = Fastor::Tensor< double, 3, 3, 3 >
 
using Marmot::FastorStandardTensors::Tensor3333d = Fastor::Tensor< double, 3, 3, 3, 3 >
 
template<typename T >
using Marmot::FastorStandardTensors::Tensor3t = Fastor::Tensor< T, 3 >
 
template<typename T >
using Marmot::FastorStandardTensors::Tensor33t = Fastor::Tensor< T, 3, 3 >
 
template<typename T >
using Marmot::FastorStandardTensors::Tensor333t = Fastor::Tensor< T, 3, 3, 3 >
 
template<typename T >
using Marmot::FastorStandardTensors::Tensor3333t = Fastor::Tensor< T, 3, 3, 3, 3 >
 
using Marmot::FastorStandardTensors::TensorMap3d = Fastor::TensorMap< double, 3 >
 
using Marmot::FastorStandardTensors::TensorMap33d = Fastor::TensorMap< double, 3, 3 >
 
using Marmot::FastorStandardTensors::TensorMap333d = Fastor::TensorMap< double, 3, 3, 3 >
 
using Marmot::FastorStandardTensors::TensorMap3333d = Fastor::TensorMap< double, 3, 3, 3, 3 >
 
using Marmot::FastorIndices::A = Fastor::Index< A_ >
 
using Marmot::FastorIndices::Ai = Fastor::Index< A_, i_ >
 
using Marmot::FastorIndices::AB = Fastor::Index< A_, B_ >
 
using Marmot::FastorIndices::B = Fastor::Index< B_ >
 
using Marmot::FastorIndices::IJ = Fastor::Index< I_, J_ >
 
using Marmot::FastorIndices::IJKL = Fastor::Index< I_, J_, K_, L_ >
 
using Marmot::FastorIndices::IJML = Fastor::Index< I_, J_, M_, L_ >
 
using Marmot::FastorIndices::IK = Fastor::Index< I_, K_ >
 
using Marmot::FastorIndices::Ii = Fastor::Index< I_, i_ >
 
using Marmot::FastorIndices::IikK = Fastor::Index< I_, i_, k_, K_ >
 
using Marmot::FastorIndices::Ik = Fastor::Index< I_, k_ >
 
using Marmot::FastorIndices::IL = Fastor::Index< I_, L_ >
 
using Marmot::FastorIndices::Im = Fastor::Index< I_, m_ >
 
using Marmot::FastorIndices::JI = Fastor::Index< J_, I_ >
 
using Marmot::FastorIndices::JK = Fastor::Index< J_, K_ >
 
using Marmot::FastorIndices::JL = Fastor::Index< J_, L_ >
 
using Marmot::FastorIndices::Jk = Fastor::Index< J_, k_ >
 
using Marmot::FastorIndices::KI = Fastor::Index< K_, I_ >
 
using Marmot::FastorIndices::KJ = Fastor::Index< K_, J_ >
 
using Marmot::FastorIndices::KJN = Fastor::Index< K_, J_, N_ >
 
using Marmot::FastorIndices::KL = Fastor::Index< K_, L_ >
 
using Marmot::FastorIndices::KLMN = Fastor::Index< K_, L_, M_, N_ >
 
using Marmot::FastorIndices::KLMP = Fastor::Index< K_, L_, M_, P_ >
 
using Marmot::FastorIndices::KLNM = Fastor::Index< K_, L_, N_, M_ >
 
using Marmot::FastorIndices::KLPM = Fastor::Index< K_, L_, P_, M_ >
 
using Marmot::FastorIndices::KLm = Fastor::Index< K_, L_, m_ >
 
using Marmot::FastorIndices::KMJ = Fastor::Index< K_, M_, J_ >
 
using Marmot::FastorIndices::KMN = Fastor::Index< K_, M_, N_ >
 
using Marmot::FastorIndices::Ki = Fastor::Index< K_, i_ >
 
using Marmot::FastorIndices::Kk = Fastor::Index< K_, k_ >
 
using Marmot::FastorIndices::L = Fastor::Index< L_ >
 
using Marmot::FastorIndices::LI = Fastor::Index< L_, I_ >
 
using Marmot::FastorIndices::LK = Fastor::Index< L_, K_ >
 
using Marmot::FastorIndices::LN = Fastor::Index< L_, N_ >
 
using Marmot::FastorIndices::Lm = Fastor::Index< L_, m_ >
 
using Marmot::FastorIndices::LmN = Fastor::Index< L_, m_, N_ >
 
using Marmot::FastorIndices::MJKL = Fastor::Index< M_, J_, K_, L_ >
 
using Marmot::FastorIndices::MK = Fastor::Index< M_, K_ >
 
using Marmot::FastorIndices::ML = Fastor::Index< M_, L_ >
 
using Marmot::FastorIndices::MNL = Fastor::Index< M_, N_, L_ >
 
using Marmot::FastorIndices::MPm = Fastor::Index< M_, P_, m_ >
 
using Marmot::FastorIndices::Mi = Fastor::Index< M_, i_ >
 
using Marmot::FastorIndices::NLJl = Fastor::Index< N_, L_, J_, l_ >
 
using Marmot::FastorIndices::Nm = Fastor::Index< N_, m_ >
 
using Marmot::FastorIndices::Pm = Fastor::Index< P_, m_ >
 
using Marmot::FastorIndices::i = Fastor::Index< i_ >
 
using Marmot::FastorIndices::iA = Fastor::Index< i_, A_ >
 
using Marmot::FastorIndices::iAkB = Fastor::Index< i_, A_, k_, B_ >
 
using Marmot::FastorIndices::iB = Fastor::Index< i_, B_ >
 
using Marmot::FastorIndices::iI = Fastor::Index< i_, I_ >
 
using Marmot::FastorIndices::iIKL = Fastor::Index< i_, I_, K_, L_ >
 
using Marmot::FastorIndices::iIjJ = Fastor::Index< i_, I_, j_, J_ >
 
using Marmot::FastorIndices::iIkK = Fastor::Index< i_, I_, k_, K_ >
 
using Marmot::FastorIndices::iIkL = Fastor::Index< i_, I_, k_, L_ >
 
using Marmot::FastorIndices::iImn = Fastor::Index< i_, I_, m_, n_ >
 
using Marmot::FastorIndices::iJ = Fastor::Index< i_, J_ >
 
using Marmot::FastorIndices::iJKL = Fastor::Index< i_, J_, K_, L_ >
 
using Marmot::FastorIndices::iJLl = Fastor::Index< i_, J_, L_, l_ >
 
using Marmot::FastorIndices::iJkL = Fastor::Index< i_, J_, k_, L_ >
 
using Marmot::FastorIndices::iJl = Fastor::Index< i_, J_, l_ >
 
using Marmot::FastorIndices::iK = Fastor::Index< i_, K_ >
 
using Marmot::FastorIndices::iKjL = Fastor::Index< i_, K_, j_, L_ >
 
using Marmot::FastorIndices::iL = Fastor::Index< i_, L_ >
 
using Marmot::FastorIndices::iM = Fastor::Index< i_, M_ >
 
using Marmot::FastorIndices::iN = Fastor::Index< i_, N_ >
 
using Marmot::FastorIndices::iNL = Fastor::Index< i_, N_, L_ >
 
using Marmot::FastorIndices::ij = Fastor::Index< i_, j_ >
 
using Marmot::FastorIndices::ijB = Fastor::Index< i_, j_, B_ >
 
using Marmot::FastorIndices::ijKJ = Fastor::Index< i_, j_, K_, J_ >
 
using Marmot::FastorIndices::ijKL = Fastor::Index< i_, j_, K_, L_ >
 
using Marmot::FastorIndices::ijL = Fastor::Index< i_, j_, L_ >
 
using Marmot::FastorIndices::ijLm = Fastor::Index< i_, j_, L_, m_ >
 
using Marmot::FastorIndices::ijk = Fastor::Index< i_, j_, k_ >
 
using Marmot::FastorIndices::ijkB = Fastor::Index< i_, j_, k_, B_ >
 
using Marmot::FastorIndices::ijkK = Fastor::Index< i_, j_, k_, K_ >
 
using Marmot::FastorIndices::ijkl = Fastor::Index< i_, j_, k_, l_ >
 
using Marmot::FastorIndices::ijl = Fastor::Index< i_, j_, l_ >
 
using Marmot::FastorIndices::ijm = Fastor::Index< i_, j_, m_ >
 
using Marmot::FastorIndices::ijmn = Fastor::Index< i_, j_, m_, n_ >
 
using Marmot::FastorIndices::ijnk = Fastor::Index< i_, j_, n_, k_ >
 
using Marmot::FastorIndices::ijnm = Fastor::Index< i_, j_, n_, m_ >
 
using Marmot::FastorIndices::ik = Fastor::Index< i_, k_ >
 
using Marmot::FastorIndices::im = Fastor::Index< i_, m_ >
 
using Marmot::FastorIndices::imk = Fastor::Index< i_, m_, k_ >
 
using Marmot::FastorIndices::imkl = Fastor::Index< i_, m_, k_, l_ >
 
using Marmot::FastorIndices::imL = Fastor::Index< i_, m_, L_ >
 
using Marmot::FastorIndices::imLk = Fastor::Index< i_, m_, L_, k_ >
 
using Marmot::FastorIndices::in = Fastor::Index< i_, n_ >
 
using Marmot::FastorIndices::inB = Fastor::Index< i_, n_, B_ >
 
using Marmot::FastorIndices::inkB = Fastor::Index< i_, n_, k_, B_ >
 
using Marmot::FastorIndices::j = Fastor::Index< j_ >
 
using Marmot::FastorIndices::jA = Fastor::Index< j_, A_ >
 
using Marmot::FastorIndices::jB = Fastor::Index< j_, B_ >
 
using Marmot::FastorIndices::jJ = Fastor::Index< j_, J_ >
 
using Marmot::FastorIndices::jL = Fastor::Index< j_, L_ >
 
using Marmot::FastorIndices::jLm = Fastor::Index< j_, L_, m_ >
 
using Marmot::FastorIndices::ji = Fastor::Index< j_, i_ >
 
using Marmot::FastorIndices::jin = Fastor::Index< j_, i_, n_ >
 
using Marmot::FastorIndices::jk = Fastor::Index< j_, k_ >
 
using Marmot::FastorIndices::jK = Fastor::Index< j_, K_ >
 
using Marmot::FastorIndices::jkB = Fastor::Index< j_, k_, B_ >
 
using Marmot::FastorIndices::jkl = Fastor::Index< j_, k_, l_ >
 
using Marmot::FastorIndices::jl = Fastor::Index< j_, l_ >
 
using Marmot::FastorIndices::k = Fastor::Index< k_ >
 
using Marmot::FastorIndices::kA = Fastor::Index< k_, A_ >
 
using Marmot::FastorIndices::kB = Fastor::Index< k_, B_ >
 
using Marmot::FastorIndices::kI = Fastor::Index< k_, I_ >
 
using Marmot::FastorIndices::kK = Fastor::Index< k_, K_ >
 
using Marmot::FastorIndices::kL = Fastor::Index< k_, L_ >
 
using Marmot::FastorIndices::kM = Fastor::Index< k_, M_ >
 
using Marmot::FastorIndices::kNL = Fastor::Index< k_, N_, L_ >
 
using Marmot::FastorIndices::kj = Fastor::Index< k_, j_ >
 
using Marmot::FastorIndices::kJ = Fastor::Index< k_, J_ >
 
using Marmot::FastorIndices::kl = Fastor::Index< k_, l_ >
 
using Marmot::FastorIndices::km = Fastor::Index< k_, m_ >
 
using Marmot::FastorIndices::l = Fastor::Index< l_ >
 
using Marmot::FastorIndices::lB = Fastor::Index< l_, B_ >
 
using Marmot::FastorIndices::lm = Fastor::Index< l_, m_ >
 
using Marmot::FastorIndices::m = Fastor::Index< m_ >
 
using Marmot::FastorIndices::mK = Fastor::Index< m_, K_ >
 
using Marmot::FastorIndices::mLl = Fastor::Index< m_, L_, l_ >
 
using Marmot::FastorIndices::mj = Fastor::Index< m_, j_ >
 
using Marmot::FastorIndices::mjL = Fastor::Index< m_, j_, L_ >
 
using Marmot::FastorIndices::mn = Fastor::Index< m_, n_ >
 
using Marmot::FastorIndices::mnKL = Fastor::Index< m_, n_, K_, L_ >
 
using Marmot::FastorIndices::mnij = Fastor::Index< m_, n_, i_, j_ >
 
using Marmot::FastorIndices::mnkB = Fastor::Index< m_, n_, k_, B_ >
 
using Marmot::FastorIndices::mnkL = Fastor::Index< m_, n_, k_, L_ >
 
using Marmot::FastorIndices::nB = Fastor::Index< n_, B_ >
 
using Marmot::FastorIndices::to_IJKL = Fastor::OIndex< I_, J_, K_, L_ >
 
using Marmot::FastorIndices::to_IJkK = Fastor::OIndex< I_, J_, k_, K_ >
 
using Marmot::FastorIndices::to_IJkL = Fastor::OIndex< I_, J_, k_, L_ >
 
using Marmot::FastorIndices::to_IikK = Fastor::OIndex< I_, i_, k_, K_ >
 
using Marmot::FastorIndices::to_IjkK = Fastor::OIndex< I_, j_, k_, K_ >
 
using Marmot::FastorIndices::to_Ii = Fastor::OIndex< I_, i_ >
 
using Marmot::FastorIndices::to_NLJl = Fastor::OIndex< N_, L_, J_, l_ >
 
using Marmot::FastorIndices::to_iIKL = Fastor::OIndex< i_, I_, K_, L_ >
 
using Marmot::FastorIndices::to_iIjJ = Fastor::OIndex< i_, I_, j_, J_ >
 
using Marmot::FastorIndices::to_iImn = Fastor::OIndex< i_, I_, m_, n_ >
 
using Marmot::FastorIndices::to_ij = Fastor::OIndex< i_, j_ >
 
using Marmot::FastorIndices::to_ijIJ = Fastor::OIndex< i_, j_, I_, J_ >
 
using Marmot::FastorIndices::to_ijKL = Fastor::OIndex< i_, j_, K_, L_ >
 
using Marmot::FastorIndices::to_ijL = Fastor::OIndex< i_, j_, L_ >
 
using Marmot::FastorIndices::to_ijLk = Fastor::OIndex< i_, j_, L_, k_ >
 
using Marmot::FastorIndices::to_ijLm = Fastor::OIndex< i_, j_, L_, m_ >
 
using Marmot::FastorIndices::to_ijk = Fastor::OIndex< i_, j_, k_ >
 
using Marmot::FastorIndices::to_ijkK = Fastor::OIndex< i_, j_, k_, K_ >
 
using Marmot::FastorIndices::to_ijkL = Fastor::OIndex< i_, j_, k_, L_ >
 
using Marmot::FastorIndices::to_ijKl = Fastor::OIndex< i_, j_, K_, l_ >
 
using Marmot::FastorIndices::to_ijkl = Fastor::OIndex< i_, j_, k_, l_ >
 
using Marmot::FastorIndices::to_ijm = Fastor::OIndex< i_, j_, m_ >
 
using Marmot::FastorIndices::to_ijmM = Fastor::OIndex< i_, j_, m_, M_ >
 
using Marmot::FastorIndices::to_jAB = Fastor::OIndex< j_, A_, B_ >
 
using Marmot::FastorIndices::to_jAkB = Fastor::OIndex< j_, A_, k_, B_ >
 
using Marmot::FastorIndices::to_ji = Fastor::OIndex< j_, i_ >
 
using Marmot::FastorIndices::to_jikL = Fastor::OIndex< j_, i_, k_, L_ >
 
using Marmot::FastorIndices::to_jikl = Fastor::OIndex< j_, i_, k_, l_ >
 
using Marmot::FastorIndices::to_jkiB = Fastor::OIndex< j_, k_, i_, B_ >
 
using Marmot::FastorIndices::to_kK = Fastor::OIndex< k_, K_ >
 
using Marmot::FastorIndices::to_kL = Fastor::OIndex< k_, L_ >
 

Enumerations

enum  {
  Marmot::FastorIndices::i_, Marmot::FastorIndices::j_, Marmot::FastorIndices::k_, Marmot::FastorIndices::l_,
  Marmot::FastorIndices::m_, Marmot::FastorIndices::n_, Marmot::FastorIndices::A_, Marmot::FastorIndices::B_,
  Marmot::FastorIndices::I_, Marmot::FastorIndices::J_, Marmot::FastorIndices::K_, Marmot::FastorIndices::L_,
  Marmot::FastorIndices::M_, Marmot::FastorIndices::N_, Marmot::FastorIndices::P_
}
 
enum  Marmot::DimensionType { Marmot::U, Marmot::W }
 

Functions

template<typename T , size_t nRows, size_t nCols, typename = std::enable_if< !std::is_const< std::remove_reference< T > >::value >>
auto Marmot::mapEigenToFastor (const Fastor::Tensor< T, nRows, nCols > &fastor)
 
template<typename T , size_t nRows, size_t nCols, typename = void>
auto Marmot::mapEigenToFastor (Fastor::Tensor< T, nRows, nCols > &fastor)
 
template<typename T , size_t nRows, typename = void>
auto Marmot::mapEigenToFastor (const Fastor::Tensor< T, nRows > &fastor)
 
template<typename T , size_t nRows, typename = void>
auto Marmot::mapEigenToFastor (const Fastor::TensorMap< T, nRows > &fastor)
 
template<typename T , size_t nRows, size_t nCols, typename = void>
auto Marmot::mapEigenToFastor (const Fastor::TensorMap< T, nRows, nCols > &fastor)
 
template<template< typename, size_t... > class TensorType, typename T , size_t... Rest>
void Marmot::copyFastorToColumnMajor (T *target, const TensorType< T, Rest... > &source)
 
template<DimensionType... dims, typename T , size_t... dims3D>
auto Marmot::reduceTo2D (const Fastor::Tensor< T, dims3D... > &theTensor3D)
 
template<typename Derived , size_t order>
auto Marmot::reduceTo2D (const Fastor::AbstractTensor< Derived, order > &theTensor3D)
 
constexpr int Marmot::const3 (size_t x)
 
template<typename T , size_t... dims2D>
auto Marmot::expandTo3D (const Fastor::Tensor< T, dims2D... > &theTensor2D)
 
template<typename Derived , size_t order>
auto Marmot::expandTo3D (const Fastor::AbstractTensor< Derived, order > &theTensor2D)
 
template<typename T , size_t... Rest>
Fastor::Tensor< T, Rest... > Marmot::multiplyFastorTensorWithScalar (Fastor::Tensor< T, Rest... > tensor, T scalar)
 
template<typename T >
Marmot::einsum_ij_ij_hardcoded (const FastorStandardTensors::Tensor33t< T > &A, const FastorStandardTensors::Tensor33t< T > &B)
 
template<typename T , size_t... Rest>
Fastor::Tensor< T, Rest... > Marmot::fastorTensorFromDoubleTensor (const Fastor::Tensor< double, Rest... > &in)
 
template<typename T , size_t... Rest>
Fastor::Tensor< T, Rest... > Marmot::fastorTensorFromDoubleTensorMap (const Fastor::TensorMap< double, Rest... > &in)
 
template<typename T , size_t... Rest>
Fastor::Tensor< double, Rest... > Marmot::makeReal (const Fastor::Tensor< T, Rest... > &in)
 
template<typename T , size_t... Rest>
Fastor::Tensor< autodiff::dual, Rest... > Marmot::makeDual (const Fastor::Tensor< T, Rest... > &in)
 
template<size_t order, size_t... Rest>
Fastor::Tensor< autodiff::HigherOrderDual< order, double >, Rest... > Marmot::makeHigherOrderDual (const Fastor::Tensor< double, Rest... > &in)
 
template<typename T >
FastorStandardTensors::Tensor33t< T > Marmot::symmetric (const FastorStandardTensors::Tensor33t< T > &t)
 
template<typename T >
FastorStandardTensors::Tensor33t< T > Marmot::deviatoric (const FastorStandardTensors::Tensor33t< T > &t)
 

Variables

const Tensor33d Marmot::FastorStandardTensors::Spatial3D::I
 
const Tensor333d Marmot::FastorStandardTensors::Spatial3D::LeviCivita
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::IHyd
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::ISymm
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::ISkew
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::I4
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::ITranspose
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::Deviatoric = I4 - 1. / 3 * IHyd
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::DeviatoricTranspose = Fastor::transpose( DeviatoricTranspose )
 
const Tensor3333d Marmot::FastorStandardTensors::Spatial3D::DeviatoricSymmetric = ISymm - 1. / 3 * IHyd