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 1366 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 1368 of file UserDataOperators.hpp.

1368 {
1369 static const auto t_basis = [] {
1370 FTENSOR_INDEXES(3, i, j);
1371 FTensor::Index<'A', 5> A;
1373 t_basis(i, j, A) = 0.;
1374 constexpr double inverse_sqrt_two = 0.70710678118654752440;
1375 constexpr double inverse_sqrt_six = 0.40824829046386301637;
1376 t_basis(0, 0, 0) = inverse_sqrt_two;
1377 t_basis(1, 1, 0) = -inverse_sqrt_two;
1378 t_basis(0, 0, 1) = inverse_sqrt_six;
1379 t_basis(1, 1, 1) = inverse_sqrt_six;
1380 t_basis(2, 2, 1) = -2. * inverse_sqrt_six;
1381 t_basis(0, 1, 2) = inverse_sqrt_two;
1382 t_basis(0, 2, 3) = inverse_sqrt_two;
1383 t_basis(1, 2, 4) = inverse_sqrt_two;
1384 return t_basis;
1385 }();
1386 return t_basis;
1387 }
#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 1407 of file UserDataOperators.hpp.

1407 {
1408 FTENSOR_INDEXES(3, i, j);
1409 FTensor::Index<'A', 5> A;
1410 const auto &t_basis = getBasis();
1411 FTensor::Tensor1<double, 5> t_coordinates;
1412 t_coordinates(A) = t_basis(i, j, A) * t_tensor(i, j);
1413 return t_coordinates;
1414 }
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 1392 of file UserDataOperators.hpp.

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

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