v0.16.3
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
MoFEM::Tensor2SymmetricDeviatorBasis Struct Reference

#include "src/finite_elements/UserDataOperators.hpp"

Static Public Member Functions

static const FTensor::Dg< double, 3, 5 > & getBasis ()
 Basis columns (11-22)/sqrt(2), (11+22-2*33)/sqrt(6), 12, 13, 23.
 
template<typename T , int Size>
static FTensor::Tensor2_symmetric< double, 3 > getTensor (const FTensor::Tensor1< T, Size > &t_coordinates, const double theta=0.)
 Reconstruct D + theta*I/3; input may be an owning tensor or a view.
 
template<typename Tensor >
static FTensor::Tensor1< double, 5 > getCoordinates (const Tensor &t_tensor)
 Project a full or symmetric tensor onto the five orthonormal columns.
 

Detailed Description

Orthonormal coordinates for three-dimensional symmetric deviators. Three coordinates retain the planar E1, E2, E3 subspace; five span all symmetric trace-free tensors. Both reconstructions return a 3x3 tensor.

Definition at line 1370 of file UserDataOperators.hpp.

Member Function Documentation

◆ getBasis()

static const FTensor::Dg< double, 3, 5 > & MoFEM::Tensor2SymmetricDeviatorBasis::getBasis ( )
inlinestatic

Basis columns (11-22)/sqrt(2), (11+22-2*33)/sqrt(6), 12, 13, 23.

Definition at line 1372 of file UserDataOperators.hpp.

1372 {
1373 static const auto t_basis = [] {
1374 FTENSOR_INDEXES(3, i, j);
1375 FTensor::Index<'A', 5> A;
1377 t_basis(i, j, A) = 0.;
1378 constexpr double inverse_sqrt_two = 0.70710678118654752440;
1379 constexpr double inverse_sqrt_six = 0.40824829046386301637;
1380 t_basis(0, 0, 0) = inverse_sqrt_two;
1381 t_basis(1, 1, 0) = -inverse_sqrt_two;
1382 t_basis(0, 0, 1) = inverse_sqrt_six;
1383 t_basis(1, 1, 1) = inverse_sqrt_six;
1384 t_basis(2, 2, 1) = -2. * inverse_sqrt_six;
1385 t_basis(0, 1, 2) = inverse_sqrt_two;
1386 t_basis(0, 2, 3) = inverse_sqrt_two;
1387 t_basis(1, 2, 4) = inverse_sqrt_two;
1388 return t_basis;
1389 }();
1390 return t_basis;
1391 }
#define FTENSOR_INDEXES(DIM,...)
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
constexpr AssemblyType A

◆ getCoordinates()

template<typename Tensor >
static FTensor::Tensor1< double, 5 > MoFEM::Tensor2SymmetricDeviatorBasis::getCoordinates ( const Tensor &  t_tensor)
inlinestatic

Project a full or symmetric tensor onto the five orthonormal columns.

Definition at line 1411 of file UserDataOperators.hpp.

1411 {
1412 FTENSOR_INDEXES(3, i, j);
1413 FTensor::Index<'A', 5> A;
1414 const auto &t_basis = getBasis();
1415 FTensor::Tensor1<double, 5> t_coordinates;
1416 t_coordinates(A) = t_basis(i, j, A) * t_tensor(i, j);
1417 return t_coordinates;
1418 }
static const FTensor::Dg< double, 3, 5 > & getBasis()
Basis columns (11-22)/sqrt(2), (11+22-2*33)/sqrt(6), 12, 13, 23.

◆ getTensor()

template<typename T , int Size>
static FTensor::Tensor2_symmetric< double, 3 > MoFEM::Tensor2SymmetricDeviatorBasis::getTensor ( const FTensor::Tensor1< T, Size > &  t_coordinates,
const double  theta = 0. 
)
inlinestatic

Reconstruct D + theta*I/3; input may be an owning tensor or a view.

Definition at line 1396 of file UserDataOperators.hpp.

1397 {
1398 static_assert(Size == 3 || Size == 5, "Expected three or five coordinates");
1399 FTENSOR_INDEXES(3, i, j);
1400 FTensor::Index<'A', Size> A;
1401 constexpr auto t_identity = FTensor::Kronecker_Delta_symmetric<int>();
1402 const auto &t_basis = getBasis();
1404 t_tensor(i, j) =
1405 t_basis(i, j, A) * t_coordinates(A) + (theta / 3.) * t_identity(i, j);
1406 return t_tensor;
1407 }
Kronecker Delta class symmetric.

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