|
| v0.14.0
|
|
struct | AddHOOps |
|
struct | AddHOOps< 2, 3, 3 > |
|
struct | AddHOOps< 3, 3, 3 > |
|
struct | BcDisp |
|
struct | BcRot |
|
struct | CGGUserPolynomialBase |
|
struct | ContactTree |
|
struct | DataAtIntegrationPts |
|
struct | EshelbianCore |
|
struct | FaceRule |
|
struct | FaceUserDataOperatorStabAssembly |
|
struct | HMHHencky |
|
struct | HMHNeohookean |
|
struct | HMHPMooneyRivlinWriggersEq63 |
|
struct | HMHStVenantKirchhoff |
|
struct | isEq |
|
struct | OpAssembleBasic |
|
struct | OpAssembleFace |
|
struct | OpAssembleVolume |
|
struct | OpBrokenTractionBc |
|
struct | OpCalculateEshelbyStress |
|
struct | OpCalculateRotationAndSpatialGradient |
|
struct | OpConstrainBoundaryHDivLhs_dU |
|
struct | OpConstrainBoundaryHDivLhs_dU< A, IntegrationType::GAUSS > |
|
struct | OpConstrainBoundaryHDivRhs |
|
struct | OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS > |
|
struct | OpConstrainBoundaryL2Lhs_dP |
|
struct | OpConstrainBoundaryL2Lhs_dP< A, IntegrationType::GAUSS > |
|
struct | OpConstrainBoundaryL2Lhs_dU |
|
struct | OpConstrainBoundaryL2Rhs |
|
struct | OpDispBc |
|
struct | OpDispBcImpl |
|
struct | OpDispBcImpl< A, GAUSS > |
|
struct | OpHMHH |
|
struct | OpJacobian |
|
struct | OpMoveNode |
|
struct | OpPostProcDataStructure |
|
struct | OpRotationBc |
|
struct | OpRotationBcImpl |
|
struct | OpRotationBcImpl< A, GAUSS > |
|
struct | OpSpatialConsistency_dBubble_dBubble |
|
struct | OpSpatialConsistency_dBubble_domega |
|
struct | OpSpatialConsistency_dBubble_dP |
|
struct | OpSpatialConsistency_dP_domega |
|
struct | OpSpatialConsistency_dP_dP |
|
struct | OpSpatialConsistencyBubble |
|
struct | OpSpatialConsistencyDivTerm |
|
struct | OpSpatialConsistencyP |
|
struct | OpSpatialEquilibrium |
|
struct | OpSpatialEquilibrium_dw_dP |
|
struct | OpSpatialEquilibrium_dw_dw |
|
struct | OpSpatialPhysical |
|
struct | OpSpatialPhysical_du_dBubble |
|
struct | OpSpatialPhysical_du_domega |
|
struct | OpSpatialPhysical_du_dP |
|
struct | OpSpatialPhysical_du_du |
|
struct | OpSpatialPrj |
|
struct | OpSpatialPrj_dx_dw |
|
struct | OpSpatialPrj_dx_dx |
|
struct | OpSpatialRotation |
|
struct | OpSpatialRotation_domega_dBubble |
|
struct | OpSpatialRotation_domega_domega |
|
struct | OpSpatialRotation_domega_dP |
|
struct | OpTreeSearch |
|
struct | PhysicalEquations |
|
struct | SetIntegrationAtFrontVolume |
|
struct | TensorTypeExtractor |
|
struct | TensorTypeExtractor< FTensor::PackPtr< T, I > > |
|
struct | TractionBc |
|
struct | VolRule |
| Set integration rule on element. More...
|
|
struct | VolUserDataOperatorStabAssembly |
|
|
MoFEMErrorCode | CGG_BubbleBase_MBTET (const int p, const double *N, const double *diffN, FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > &phi, const int gdim) |
| Calculate CGGT tonsorial bubble base. More...
|
|
auto | diff_deviator (FTensor::Ddg< double, 3, 3 > &&t_diff_stress) |
|
auto | diff_tensor () |
|
auto | symm_L_tensor () |
|
auto | diff_symmetrize () |
|
auto | checkSdf (EntityHandle fe_ent, std::map< int, Range > &sdf_map_range) |
|
template<typename OP_PTR > |
auto | getSdf (OP_PTR op_ptr, MatrixDouble &contact_disp, int block_id, bool eval_hessian) |
|
template<typename T1 > |
auto | multiPoint (std::array< double, 3 > &unit_ray, std::array< double, 3 > &point, std::array< double, 9 > &elem_point_nodes, std::array< double, 9 > &elem_traction_nodes, FTensor::Tensor1< T1, 3 > &t_spatial_coords) |
| Calculate points data on contact surfaces. More...
|
|
template<typename T1 > |
auto | multiMasterPoint (ContactTree::FaceData *face_data_ptr, FTensor::Tensor1< T1, 3 > &t_spatial_coords) |
|
template<typename T1 > |
auto | multiSlavePoint (ContactTree::FaceData *face_data_ptr, FTensor::Tensor1< T1, 3 > &t_spatial_coords) |
|
template<typename T1 > |
auto | multiGetGap (ContactTree::FaceData *face_data_ptr, FTensor::Tensor1< T1, 3 > &t_spatial_coords) |
|
template<typename T1 , typename T2 , typename T3 > |
auto | multiPointRhs (ContactTree::FaceData *face_data_ptr, FTensor::Tensor1< T1, 3 > &t_coords, FTensor::Tensor1< T2, 3 > &t_spatial_coords, FTensor::Tensor1< T3, 3 > &t_master_traction, MultiPointRhsType type, bool debug=false) |
|
template<typename T > |
auto | get_rotation_form_vector (FTensor::Tensor1< T, 3 > &t_omega, RotSelector rotSelector=LARGE_ROT) |
|
template<typename T > |
auto | get_diff_rotation_form_vector (FTensor::Tensor1< T, 3 > &t_omega, RotSelector rotSelector=LARGE_ROT) |
|
template<typename T > |
auto | get_diff2_rotation_form_vector (FTensor::Tensor1< T, 3 > &t_omega, RotSelector rotSelector=LARGE_ROT) |
|
auto | is_eq (const double &a, const double &b) |
|
template<int DIM> |
auto | get_uniq_nb (double *ptr) |
|
template<int DIM> |
auto | sort_eigen_vals (FTensor::Tensor1< double, DIM > &eig, FTensor::Tensor2< double, DIM, DIM > &eigen_vec) |
|
|
constexpr static auto | size_symm = (3 * (3 + 1)) / 2 |
|
◆ BcDispVec
◆ BcRotVec
◆ EntData
◆ FaceUserDataOperator
◆ MatrixPtr
◆ TractionBcVec
◆ TractionFreeBc
◆ UserDataOperator
◆ VectorPtr
◆ VolUserDataOperator
◆ MultiPointRhsType
◆ RotSelector
◆ StretchSelector
◆ CGG_BubbleBase_MBTET()
Calculate CGGT tonsorial bubble base.
See details in [20]
- Parameters
-
p | polynomial order |
N | shape functions |
diffN | direvatives of shape functions |
l2_base | base functions for l2 space |
diff_l2_base | direvatives base functions for l2 space |
phi | returned base functions |
gdim | number of integration points |
- Returns
- MoFEMErrorCode
- Examples
- EshelbianPlasticity.cpp.
Definition at line 20 of file CGGTonsorialBubbleBase.cpp.
41 for (
int ii = 0; ii != 4; ++ii) {
42 t_diff_n[ii](
i) = t_diff_n_tmp(
i);
48 for (
int ii = 0; ii != 3; ++ii)
49 t_diff_ksi[ii](
i) = t_diff_n[ii + 1](
i) - t_diff_n[0](
i);
51 int lp = p >= 2 ? p - 2 + 1 : 0;
59 for (
int ii = 0; ii != 3; ++ii)
62 for (
int gg = 0; gg != gdim; ++gg) {
64 const int node_shift = gg * 4;
66 for (
int ii = 0; ii != 3; ++ii) {
68 auto &t_diff_ksi_ii = t_diff_ksi[ii];
70 auto &diff_l_ii = diff_l[ii];
71 auto &diff2_l_ii = diff2_l[ii];
73 double ksi_ii =
N[node_shift + ii + 1] -
N[node_shift + 0];
76 &*l_ii.data().begin(),
77 &*diff_l_ii.data().begin(), 3);
79 for (
int l = 1;
l < lp; ++
l) {
81 const double b = ((
double)
l / ((
double)
l + 1));
82 for (
int d0 = 0; d0 != 3; ++d0)
83 for (
int d1 = 0; d1 != 3; ++d1) {
84 const int r = 3 * d0 + d1;
85 diff2_l_ii(
r,
l + 1) =
a * (t_diff_ksi_ii(d0) * diff_l_ii(d1,
l) +
86 t_diff_ksi_ii(d1) * diff_l_ii(d0,
l) +
87 ksi_ii * diff2_l_ii(
r,
l)) -
88 b * diff2_l_ii(
r,
l - 1);
93 const double n[] = {
N[node_shift + 0],
N[node_shift + 1],
N[node_shift + 2],
98 const int tab[4][4] = {
99 {1, 2, 3, 0}, {2, 3, 0, 1}, {3, 0, 1, 2}, {0, 1, 2, 3}};
101 t_bk_diff(
i,
j,
k) = 0;
102 for (
int ii = 0; ii != 3; ++ii) {
103 const int i0 = tab[ii][0];
104 const int i1 = tab[ii][1];
105 const int i2 = tab[ii][2];
106 const int i3 = tab[ii][3];
107 auto &t_diff_n_i0 = t_diff_n[i0];
108 auto &t_diff_n_i1 = t_diff_n[i1];
109 auto &t_diff_n_i2 = t_diff_n[i2];
110 auto &t_diff_n_i3 = t_diff_n[i3];
112 t_k(
i,
j) = t_diff_n_i3(
i) * t_diff_n_i3(
j);
113 const double b =
n[i0] *
n[i1] *
n[i2];
114 t_bk(
i,
j) += b * t_k(
i,
j);
116 t_diff_b(
i) = t_diff_n_i0(
i) *
n[i1] *
n[i2] +
117 t_diff_n_i1(
i) *
n[i0] *
n[i2] +
118 t_diff_n_i2(
i) *
n[i0] *
n[i1];
119 t_bk_diff(
i,
j,
k) += t_k(
i,
j) * t_diff_b(
k);
123 for (
int o = p - 2 + 1; o <= p - 2 + 1; ++o) {
125 for (
int ii = 0; ii <= o; ++ii)
126 for (
int jj = 0; (ii + jj) <= o; ++jj) {
128 const int kk = o - ii - jj;
130 auto get_diff_l = [&](
const int y,
const int i) {
134 auto get_diff2_l = [&](
const int y,
const int i) {
136 diff2_l[y](0,
i), diff2_l[y](1,
i), diff2_l[y](2,
i),
137 diff2_l[y](3,
i), diff2_l[y](4,
i), diff2_l[y](5,
i),
138 diff2_l[y](6,
i), diff2_l[y](7,
i), diff2_l[y](8,
i));
142 auto t_diff_i = get_diff_l(0, ii);
143 auto t_diff2_i = get_diff2_l(0, ii);
145 auto t_diff_j = get_diff_l(1, jj);
146 auto t_diff2_j = get_diff2_l(1, jj);
148 auto t_diff_k = get_diff_l(2, kk);
149 auto t_diff2_k = get_diff2_l(2, kk);
152 t_diff_l2(
i) = t_diff_i(
i) * l_j * l_k + t_diff_j(
i) * l_i * l_k +
153 t_diff_k(
i) * l_i * l_j;
156 t_diff2_i(
i,
j) * l_j * l_k + t_diff_i(
i) * t_diff_j(
j) * l_k +
157 t_diff_i(
i) * l_j * t_diff_k(
j) +
159 t_diff2_j(
i,
j) * l_i * l_k + t_diff_j(
i) * t_diff_i(
j) * l_k +
160 t_diff_j(
i) * l_i * t_diff_k(
j) +
162 t_diff2_k(
i,
j) * l_i * l_j + t_diff_k(
i) * t_diff_i(
j) * l_j +
163 t_diff_k(
i) * l_i * t_diff_j(
j);
165 for (
int dd = 0;
dd != 3; ++
dd) {
168 t_axial_diff(
i,
j) = 0;
169 for (
int mm = 0; mm != 3; ++mm)
170 t_axial_diff(
dd, mm) = t_diff_l2(mm);
177 t_curl_A_bK_diff(
i,
j,
k) = t_curl_A(
i,
m) * t_bk_diff(
m,
j,
k);
180 t_axial_diff2(
i,
j,
k) = 0;
181 for (
int mm = 0; mm != 3; ++mm)
182 for (
int nn = 0; nn != 3; ++nn)
183 t_axial_diff2(
dd, mm, nn) = t_diff2_l2(mm, nn);
185 t_A_diff2(
i,
j,
k,
f) =
188 t_curl_A_diff2(
i,
j,
k) =
191 t_curl_A_diff2_bK(
i,
j,
k) = t_curl_A_diff2(
i,
m,
k) * t_bk(
m,
j);
194 t_curl_A_diff2_bK(
i,
f,
m));
203 "Wrong number of base functions %d != %d", zz,
◆ checkSdf()
auto EshelbianPlasticity::checkSdf |
( |
EntityHandle |
fe_ent, |
|
|
std::map< int, Range > & |
sdf_map_range |
|
) |
| |
Definition at line 17 of file EshelbianContact.cpp.
18 for (
auto &m_sdf : sdf_map_range) {
19 if (m_sdf.second.find(fe_ent) != m_sdf.second.end())
◆ diff_deviator()
Definition at line 12 of file EshelbianAux.hpp.
19 t_diff_deviator(
i,
j,
k,
l) = t_diff_stress(
i,
j,
k,
l);
21 constexpr
double third = boost::math::constants::third<double>();
23 t_diff_deviator(0, 0, 0, 0) -=
third;
24 t_diff_deviator(0, 0, 1, 1) -=
third;
26 t_diff_deviator(1, 1, 0, 0) -=
third;
27 t_diff_deviator(1, 1, 1, 1) -=
third;
29 t_diff_deviator(2, 2, 0, 0) -=
third;
30 t_diff_deviator(2, 2, 1, 1) -=
third;
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;
36 return t_diff_deviator;
◆ diff_symmetrize()
auto EshelbianPlasticity::diff_symmetrize |
( |
| ) |
|
|
inline |
Definition at line 67 of file EshelbianAux.hpp.
76 t_diff(
i,
j,
k,
l) = 0;
77 t_diff(0, 0, 0, 0) = 1;
78 t_diff(1, 1, 1, 1) = 1;
80 t_diff(1, 0, 1, 0) = 0.5;
81 t_diff(1, 0, 0, 1) = 0.5;
83 t_diff(0, 1, 0, 1) = 0.5;
84 t_diff(0, 1, 1, 0) = 0.5;
87 t_diff(2, 2, 2, 2) = 1;
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;
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;
◆ diff_tensor()
auto EshelbianPlasticity::diff_tensor |
( |
| ) |
|
|
inline |
◆ get_diff2_rotation_form_vector()
- Examples
- EshelbianOperators.cpp.
Definition at line 108 of file EshelbianOperators.cpp.
111 using D =
typename TensorTypeExtractor<T>::Type;
116 constexpr
double eps = 1e-10;
117 for (
int l = 0;
l != 3; ++
l) {
119 t_omega_c(
i) = t_omega(
i);
120 t_omega_c(
l) += std::complex<double>(0,
eps);
122 for (
int i = 0;
i != 3; ++
i) {
123 for (
int j = 0;
j != 3; ++
j) {
124 for (
int k = 0;
k != 3; ++
k) {
125 t_diff2_R(
i,
j,
k,
l) = t_diff_R_c(
i,
j,
k).imag() /
eps;
◆ get_diff_rotation_form_vector()
- Examples
- EshelbianOperators.cpp.
Definition at line 60 of file EshelbianOperators.cpp.
63 using D =
typename TensorTypeExtractor<T>::Type;
73 sqrt(t_omega(
i) * t_omega(
i)) + std::numeric_limits<double>::epsilon();
75 t_diff_R(
i,
j,
k) = FTensor::levi_civita<double>(
i,
j,
k);
79 const auto ss = sin(angle);
80 const auto a = ss / angle;
81 t_diff_R(
i,
j,
k) =
a * FTensor::levi_civita<double>(
i,
j,
k);
84 t_Omega(
i,
j) = FTensor::levi_civita<double>(
i,
j,
k) * t_omega(
k);
86 const auto angle2 = angle * angle;
87 const auto cc = cos(angle);
88 const auto diff_a = (angle * cc - ss) / angle2;
89 t_diff_R(
i,
j,
k) += diff_a * t_Omega(
i,
j) * (t_omega(
k) / angle);
93 const auto ss_2 = sin(angle / 2.);
94 const auto cc_2 = cos(angle / 2.);
95 const auto b = 2. * ss_2 * ss_2 / angle2;
97 b * (t_Omega(
i,
l) * FTensor::levi_civita<double>(
l,
j,
k) +
98 FTensor::levi_civita<double>(
i,
l,
k) * t_Omega(
l,
j));
100 (2. * angle * ss_2 * cc_2 - 4. * ss_2 * ss_2) / (angle2 * angle);
102 diff_b * t_Omega(
i,
l) * t_Omega(
l,
j) * (t_omega(
k) / angle);
◆ get_rotation_form_vector()
- Examples
- EshelbianOperators.cpp.
Definition at line 24 of file EshelbianOperators.cpp.
27 using D =
typename TensorTypeExtractor<T>::Type;
38 t_Omega(
i,
j) = FTensor::levi_civita<double>(
i,
j,
k) * t_omega(
k);
41 t_R(
i,
j) += t_Omega(
i,
j);
46 sqrt(t_omega(
i) * t_omega(
i)) + std::numeric_limits<double>::epsilon();
47 const auto a = sin(angle) / angle;
48 t_R(
i,
j) +=
a * t_Omega(
i,
j);
52 const auto ss_2 = sin(angle / 2.) / angle;
53 const auto b = 2. * ss_2 * ss_2;
54 t_R(
i,
j) += b * t_Omega(
i,
k) * t_Omega(
k,
j);
◆ get_uniq_nb()
template<int DIM>
auto EshelbianPlasticity::get_uniq_nb |
( |
double * |
ptr | ) |
|
|
inline |
- Examples
- EshelbianOperators.cpp.
Definition at line 148 of file EshelbianOperators.cpp.
149 std::array<double, DIM> tmp;
150 std::copy(ptr, &ptr[DIM], tmp.begin());
151 std::sort(tmp.begin(), tmp.end());
152 isEq::absMax = std::max(std::abs(tmp[0]), std::abs(tmp[DIM - 1]));
153 constexpr
double eps = std::numeric_limits<float>::epsilon();
154 isEq::absMax = std::max(isEq::absMax,
static_cast<double>(
eps));
155 return std::distance(tmp.begin(), std::unique(tmp.begin(), tmp.end(),
is_eq));
◆ getSdf()
template<typename OP_PTR >
auto EshelbianPlasticity::getSdf |
( |
OP_PTR |
op_ptr, |
|
|
MatrixDouble & |
contact_disp, |
|
|
int |
block_id, |
|
|
bool |
eval_hessian |
|
) |
| |
Definition at line 26 of file EshelbianContact.cpp.
29 auto nb_gauss_pts = op_ptr->getGaussPts().size2();
31 auto ts_time = op_ptr->getTStime();
32 auto ts_time_step = op_ptr->getTStimeStep();
35 op_ptr->getFTensor1CoordsAtGaussPts(),
36 getFTensor1FromMat<3>(contact_disp), nb_gauss_pts);
38 op_ptr->getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
40 ts_time_step, ts_time, nb_gauss_pts, m_spatial_coords, m_normals_at_pts,
43 ts_time_step, ts_time, nb_gauss_pts, m_spatial_coords, m_normals_at_pts,
47 if (v_sdf.size() != nb_gauss_pts)
49 "Wrong number of integration pts");
50 if (m_grad_sdf.size2() != nb_gauss_pts)
52 "Wrong number of integration pts");
53 if (m_grad_sdf.size1() != 3)
59 ts_time_step, ts_time, nb_gauss_pts, m_spatial_coords, m_normals_at_pts,
61 return std::make_tuple(block_id, m_normals_at_pts, v_sdf, m_grad_sdf,
65 return std::make_tuple(block_id, m_normals_at_pts, v_sdf, m_grad_sdf,
◆ is_eq()
auto EshelbianPlasticity::is_eq |
( |
const double & |
a, |
|
|
const double & |
b |
|
) |
| |
|
inline |
◆ multiGetGap()
Evaluate gap and tractions between master and slave points
Definition at line 173 of file EshelbianContact.cpp.
176 auto [t_slave_point_current, t_slave_traction_current, t_slave_normal] =
178 auto [t_master_point_current, t_master_traction_current, t_master_normal] =
184 t_normal(
i) = t_master_normal(
i) - t_slave_normal(
i);
187 auto gap = t_normal(
i) * (t_slave_point_current(
i) - t_spatial_coords(
i));
188 auto tn_master = t_master_traction_current(
i) * t_normal(
i);
189 auto tn_slave = t_slave_traction_current(
i) * t_normal(
i);
190 auto tn = std::max(-tn_master, tn_slave);
192 return std::make_tuple(gap, tn_master, tn_slave,
194 t_master_traction_current, t_slave_traction_current);
◆ multiMasterPoint()
Definition at line 144 of file EshelbianContact.cpp.
151 return multiPoint(face_data_ptr->unitRay, face_data_ptr->masterPoint,
152 face_data_ptr->masterPointNodes,
153 face_data_ptr->masterTractionNodes, t_spatial_coords);
◆ multiPoint()
template<typename T1 >
auto EshelbianPlasticity::multiPoint |
( |
std::array< double, 3 > & |
unit_ray, |
|
|
std::array< double, 3 > & |
point, |
|
|
std::array< double, 9 > & |
elem_point_nodes, |
|
|
std::array< double, 9 > & |
elem_traction_nodes, |
|
|
FTensor::Tensor1< T1, 3 > & |
t_spatial_coords |
|
) |
| |
Calculate points data on contact surfaces.
- Template Parameters
-
- Parameters
-
unit_ray | |
point | |
elem_point_nodes | |
elem_traction_nodes | |
t_spatial_coords | |
- Returns
- auto
Definition at line 82 of file EshelbianContact.cpp.
92 auto t_unit_ray = getFTensor1FromPtr<3>(unit_ray.data());
93 auto t_point = getFTensor1FromPtr<3>(point.data());
95 auto get_normal = [](
auto &ele_coords) {
97 Tools::getTriNormal(ele_coords.data(), &t_normal(0));
101 auto t_normal = get_normal(elem_point_nodes);
102 t_normal(
i) /= t_normal.
l2();
104 auto sn = t_normal(
i) * t_point(
i);
105 auto nm = t_normal(
i) * t_spatial_coords(
i);
106 auto nr = t_normal(
i) * t_unit_ray(
i);
108 auto gamma = (sn - nm) / nr;
111 t_point_current(
i) = t_spatial_coords(
i) + gamma * t_unit_ray(
i);
113 auto get_local_point_shape_functions = [&](
auto &&t_elem_coords,
115 std::array<T1, 2> loc_coords;
117 Tools::getLocalCoordinatesOnReferenceThreeNodeTri(
118 &t_elem_coords(0, 0), &t_point(0), 1, loc_coords.data()),
121 N_MBTRI1(loc_coords[0], loc_coords[1]),
122 N_MBTRI2(loc_coords[0], loc_coords[1])};
125 auto eval_position = [&](
auto &&t_field,
auto &t_shape_fun) {
129 t_point_out(
i) = t_shape_fun(
j) * t_field(
j,
i);
133 auto t_shape_fun = get_local_point_shape_functions(
134 getFTensor2FromPtr<3, 3>(elem_point_nodes.data()), t_point_current);
135 auto t_slave_point_updated = eval_position(
136 getFTensor2FromPtr<3, 3>(elem_point_nodes.data()), t_shape_fun);
137 auto t_traction_updated = eval_position(
138 getFTensor2FromPtr<3, 3>(elem_traction_nodes.data()), t_shape_fun);
140 return std::make_tuple(t_slave_point_updated, t_traction_updated, t_normal);
◆ multiPointRhs()
template<typename T1 , typename T2 , typename T3 >
Caluclate rhs term for contact
Definition at line 202 of file EshelbianContact.cpp.
214 t_u(
i) = t_spatial_coords(
i) - t_coords(
i);
221 auto [t_slave_point_current, t_slave_traction_current, t_slave_normal] =
223 auto [t_master_point_current, t_master_traction_current, t_master_normal] =
228 t_normal(
i) = t_master_normal(
i) - t_slave_normal(
i);
233 t_P(
i,
j) = t_normal(
i) * t_normal(
j);
237 constexpr
double beta = 0.5;
239 auto zeta = 1e-8 * face_data_ptr->eleRadius;
244 auto f_min_gap = [
zeta](
auto d,
auto s) {
245 return 0.5 * (
d + s - std::sqrt((
d - s) * (
d - s) +
zeta));
248 auto f_diff_min_gap = [
zeta](
auto d,
auto s) {
249 return 0.5 * (1 - (
d - s) / std::sqrt((
d - s) * (
d - s) +
zeta));
253 auto f_barrier = [alpha1, alpha2, f_min_gap, f_diff_min_gap](
auto g,
257 0.5 * (tn + f_min_gap(
d, tn) + f_diff_min_gap(
d, tn) * (
d - tn));
258 auto b2 = alpha2 * f_min_gap(
g, 0) *
g;
263 t_gap_vec(
i) = beta * t_spatial_coords(
i) +
264 (1 - beta) * t_slave_point_current(
i) - t_spatial_coords(
i);
267 -beta * t_master_traction(
i) + (beta - 1) * t_slave_traction_current(
i);
269 auto t_gap = t_normal(
i) * t_gap_vec(
i);
270 auto t_tn = t_normal(
i) * t_traction_vec(
i);
271 auto barrier = f_barrier(t_gap, t_tn);
275 t_traction_bar(
i) = t_normal(
i) * barrier;
279 t_Q(
i,
j) * t_master_traction(
j) +
281 t_P(
i,
j) * (t_master_traction(
j) - t_traction_bar(
j));
284 auto is_nan_or_inf = [](
double value) ->
bool {
285 return std::isnan(value) || std::isinf(value);
288 double v = std::complex<double>(t_rhs(
i) * t_rhs(
i)).real();
289 if (is_nan_or_inf(
v)) {
291 MOFEM_LOG(
"SELF", Sev::error) <<
"t_rhs " << t_rhs;
◆ multiSlavePoint()
Definition at line 157 of file EshelbianContact.cpp.
164 return multiPoint(face_data_ptr->unitRay, face_data_ptr->slavePoint,
165 face_data_ptr->slavePointNodes,
166 face_data_ptr->slaveTractionNodes, t_spatial_coords);
◆ sort_eigen_vals()
- Examples
- EshelbianOperators.cpp.
Definition at line 159 of file EshelbianOperators.cpp.
163 std::max(std::max(std::abs(eig(0)), std::abs(eig(1))), std::abs(eig(2)));
165 int i = 0,
j = 1,
k = 2;
167 if (
is_eq(eig(0), eig(1))) {
171 }
else if (
is_eq(eig(0), eig(2))) {
175 }
else if (
is_eq(eig(1), eig(2))) {
182 eigen_vec(
i, 0), eigen_vec(
i, 1), eigen_vec(
i, 2),
184 eigen_vec(
j, 0), eigen_vec(
j, 1), eigen_vec(
j, 2),
186 eigen_vec(
k, 0), eigen_vec(
k, 1), eigen_vec(
k, 2)};
194 eigen_vec(
i,
j) = eigen_vec_c(
i,
j);
◆ symm_L_tensor()
auto EshelbianPlasticity::symm_L_tensor |
( |
| ) |
|
|
inline |
◆ size_symm
constexpr static auto EshelbianPlasticity::size_symm = (3 * (3 + 1)) / 2 |
|
staticconstexpr |
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
auto is_eq(const double &a, const double &b)
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
UBlasMatrix< double > MatrixDouble
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
double zeta
Viscous hardening.
#define CHKERR
Inline error check.
auto multiPoint(std::array< double, 3 > &unit_ray, std::array< double, 3 > &point, std::array< double, 9 > &elem_point_nodes, std::array< double, 9 > &elem_traction_nodes, FTensor::Tensor1< T1, 3 > &t_spatial_coords)
Calculate points data on contact surfaces.
PetscErrorCode Legendre_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Legendre approximation basis.
auto multiMasterPoint(ContactTree::FaceData *face_data_ptr, FTensor::Tensor1< T1, 3 > &t_spatial_coords)
FTensor::Index< 'i', SPACE_DIM > i
Tensor1< T, Tensor_Dim > normalize()
const double v
phase velocity of light in medium (cm/ns)
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
#define MOFEM_LOG(channel, severity)
Log.
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.
#define NBVOLUMETET_CCG_BUBBLE(P)
Bubble function for CGG H div space.
FTensor::Index< 'j', 3 > j
auto get_diff_rotation_form_vector(FTensor::Tensor1< T, 3 > &t_omega, RotSelector rotSelector=LARGE_ROT)
@ MOFEM_DATA_INCONSISTENCY
auto multiSlavePoint(ContactTree::FaceData *face_data_ptr, FTensor::Tensor1< T1, 3 > &t_spatial_coords)
UBlasVector< double > VectorDouble
const double D
diffusivity
FTensor::Index< 'm', 3 > m
Kronecker Delta class symmetric.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'k', 3 > k
FTensor::Index< 'l', 3 > l