v0.14.0
EshelbianAux.hpp
Go to the documentation of this file.
1 /**
2  * @file EshelbianAux.hpp
3  * @brief Auxilary functions for Eshelbian plasticity
4  * @date 2024-08-30
5  *
6  * @copyright Copyright (c) 2024
7  *
8  */
9 
10 namespace EshelbianPlasticity {
11 
12 inline auto diff_deviator(FTensor::Ddg<double, 3, 3> &&t_diff_stress) {
17 
18  FTensor::Ddg<double, 3, 3> t_diff_deviator;
19  t_diff_deviator(i, j, k, l) = t_diff_stress(i, j, k, l);
20 
21  constexpr double third = boost::math::constants::third<double>();
22 
23  t_diff_deviator(0, 0, 0, 0) -= third;
24  t_diff_deviator(0, 0, 1, 1) -= third;
25 
26  t_diff_deviator(1, 1, 0, 0) -= third;
27  t_diff_deviator(1, 1, 1, 1) -= third;
28 
29  t_diff_deviator(2, 2, 0, 0) -= third;
30  t_diff_deviator(2, 2, 1, 1) -= third;
31 
32  t_diff_deviator(0, 0, 2, 2) -= third;
33  t_diff_deviator(1, 1, 2, 2) -= third;
34  t_diff_deviator(2, 2, 2, 2) -= third;
35 
36  return t_diff_deviator;
37 }
38 
39 constexpr static auto size_symm = (3 * (3 + 1)) / 2;
40 
41 inline auto diff_tensor() {
48  t_diff(i, j, k, l) = (t_kd(i, k) ^ t_kd(j, l)) / 4.;
49  return t_diff;
50 };
51 
52 inline auto symm_L_tensor() {
57  t_L(i, j, L) = 0;
58  t_L(0, 0, 0) = 1;
59  t_L(1, 1, 3) = 1;
60  t_L(2, 2, 5) = 1;
61  t_L(1, 0, 1) = 1;
62  t_L(2, 0, 2) = 1;
63  t_L(2, 1, 4) = 1;
64  return t_L;
65 }
66 
67 inline auto diff_symmetrize() {
68 
73 
75 
76  t_diff(i, j, k, l) = 0;
77  t_diff(0, 0, 0, 0) = 1;
78  t_diff(1, 1, 1, 1) = 1;
79 
80  t_diff(1, 0, 1, 0) = 0.5;
81  t_diff(1, 0, 0, 1) = 0.5;
82 
83  t_diff(0, 1, 0, 1) = 0.5;
84  t_diff(0, 1, 1, 0) = 0.5;
85 
86  if constexpr (SPACE_DIM == 3) {
87  t_diff(2, 2, 2, 2) = 1;
88 
89  t_diff(2, 0, 2, 0) = 0.5;
90  t_diff(2, 0, 0, 2) = 0.5;
91  t_diff(0, 2, 0, 2) = 0.5;
92  t_diff(0, 2, 2, 0) = 0.5;
93 
94  t_diff(2, 1, 2, 1) = 0.5;
95  t_diff(2, 1, 1, 2) = 0.5;
96  t_diff(1, 2, 1, 2) = 0.5;
97  t_diff(1, 2, 2, 1) = 0.5;
98  }
99 
100  return t_diff;
101 }
102 
103 template <class T> struct TensorTypeExtractor {
105 };
106 template <class T, int I> struct TensorTypeExtractor<FTensor::PackPtr<T, I>> {
108 };
109 
110 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
EshelbianPlasticity::size_symm
constexpr static auto size_symm
Definition: EshelbianAux.hpp:39
EshelbianPlasticity
Definition: CGGTonsorialBubbleBase.hpp:11
EshelbianPlasticity::diff_tensor
auto diff_tensor()
Definition: EshelbianAux.hpp:41
EshelbianPlasticity::diff_symmetrize
auto diff_symmetrize()
Definition: EshelbianAux.hpp:67
SPACE_DIM
constexpr int SPACE_DIM
Definition: child_and_parent.cpp:16
convert.type
type
Definition: convert.py:64
MoFEM::L
VectorDouble L
Definition: Projection10NodeCoordsOnField.cpp:124
EshelbianPlasticity::TensorTypeExtractor
Definition: EshelbianAux.hpp:103
EshelbianPlasticity::diff_deviator
auto diff_deviator(FTensor::Ddg< double, 3, 3 > &&t_diff_stress)
Definition: EshelbianAux.hpp:12
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
EshelbianPlasticity::symm_L_tensor
auto symm_L_tensor()
Definition: EshelbianAux.hpp:52
FTensor::Index< 'i', 3 >
FTensor::Dg
Definition: Dg_value.hpp:9
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor::Ddg< double, 3, 3 >
FTensor::Kronecker_Delta_symmetric
Kronecker Delta class symmetric.
Definition: Kronecker_Delta.hpp:49
third
constexpr double third
Definition: EshelbianADOL-C.cpp:17
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
EshelbianPlasticity::TensorTypeExtractor::Type
std::remove_pointer< T >::type Type
Definition: EshelbianAux.hpp:104
EshelbianPlasticity::TensorTypeExtractor< FTensor::PackPtr< T, I > >::Type
std::remove_pointer< T >::type Type
Definition: EshelbianAux.hpp:107
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21