9 template <
int DIM,
typename AssemblyDomainEleOp>
14 const std::string row_field_name,
const std::string col_field_name,
15 boost::shared_ptr<CommonData> common_data_ptr,
16 boost::shared_ptr<MatrixDouble> m_D_ptr);
22 boost::shared_ptr<MatrixDouble>
mDPtr;
25 template <
int DIM,
typename AssemblyDomainEleOp>
28 const std::string row_field_name,
const std::string col_field_name,
29 boost::shared_ptr<CommonData> common_data_ptr,
30 boost::shared_ptr<MatrixDouble> m_D_ptr)
33 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {
34 AssemblyDomainEleOp::sYmm =
false;
40 &mat(2 * rr + 0, 0), &mat(2 * rr + 0, 1), &mat(2 * rr + 0, 2),
41 &mat(2 * rr + 1, 0), &mat(2 * rr + 1, 1), &mat(2 * rr + 1, 2)};
47 &mat(3 * rr + 0, 0), &mat(3 * rr + 0, 1), &mat(3 * rr + 0, 2),
48 &mat(3 * rr + 0, 3), &mat(3 * rr + 0, 4), &mat(3 * rr + 0, 5),
50 &mat(3 * rr + 1, 0), &mat(3 * rr + 1, 1), &mat(3 * rr + 1, 2),
51 &mat(3 * rr + 1, 3), &mat(3 * rr + 1, 4), &mat(3 * rr + 1, 5),
53 &mat(3 * rr + 2, 0), &mat(3 * rr + 2, 1), &mat(3 * rr + 2, 2),
54 &mat(3 * rr + 2, 3), &mat(3 * rr + 2, 4), &mat(3 * rr + 2, 5)};
57 template <
int DIM,
typename AssemblyDomainEleOp>
59 OpCalculatePlasticInternalForceLhs_dEPImpl<DIM, GAUSS, AssemblyDomainEleOp>::
68 constexpr
auto size_symm = (DIM * (DIM + 1)) / 2;
73 const size_t nb_integration_pts = row_data.getN().size1();
74 const size_t nb_row_base_functions = row_data.getN().size2();
76 auto t_D = getFTensor4DdgFromMat<DIM, DIM, 0>(*mDPtr);
80 t_DL(
i,
j,
L) = t_D(
i,
j,
k,
l) * t_L(
k,
l,
L);
82 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
83 auto t_row_diff_base = row_data.getFTensor1DiffN<DIM>();
84 for (
size_t gg = 0; gg != nb_integration_pts; ++gg) {
85 double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
95 t_tmp(
i,
L) = (t_DL(
i,
j,
L)) * (alpha * t_row_diff_base(
j));
97 auto t_col_base = col_data.getFTensor0N(gg, 0);
100 t_mat(
i,
L) -= (t_col_base * t_tmp(
i,
L));
109 for (; rr < nb_row_base_functions; ++rr)
116 template <
int DIM,
typename AssemblyDomainEleOp>
120 const std::string row_field_name,
const std::string col_field_name,
121 boost::shared_ptr<CommonData> common_data_ptr,
122 boost::shared_ptr<MatrixDouble> m_D_ptr);
128 boost::shared_ptr<MatrixDouble>
mDPtr;
131 template <
int DIM,
typename AssemblyDomainEleOp>
134 const std::string row_field_name,
const std::string col_field_name,
135 boost::shared_ptr<CommonData> common_data_ptr,
136 boost::shared_ptr<MatrixDouble> m_D_ptr)
139 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {
140 AssemblyDomainEleOp::sYmm =
false;
143 template <
int DIM,
typename AssemblyDomainEleOp>
157 constexpr
auto size_symm = (DIM * (DIM + 1)) / 2;
162 const size_t nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
163 const size_t nb_row_base_functions = row_data.getN().size2();
165 auto t_res_flow_dstrain =
166 getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->resFlowDstrain);
168 auto next = [&]() { ++t_res_flow_dstrain; };
175 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
176 auto t_row_base = row_data.getFTensor0N();
177 for (
size_t gg = 0; gg != nb_integration_pts; ++gg) {
179 double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
182 t_res_tens(
L,
i,
j) =
183 alpha * ((t_L(
m,
n,
L) * (t_res_flow_dstrain(
m,
n,
k,
l))) *
184 t_diff_grad(
k,
l,
i,
j));
191 auto t_col_diff_base = col_data.getFTensor1DiffN<DIM>(gg, 0);
193 t_mat(
L,
l) += t_row_base * (t_res_tens(
L,
l,
k) * t_col_diff_base(
k));
200 for (; rr < nb_row_base_functions; ++rr)
207 template <
int DIM,
typename AssemblyDomainEleOp>
210 const std::string row_field_name,
const std::string col_field_name,
211 boost::shared_ptr<CommonData> common_data_ptr,
212 boost::shared_ptr<MatrixDouble> m_D_ptr)
215 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {
216 AssemblyDomainEleOp::sYmm =
false;
219 template <
int DIM,
typename AssemblyDomainEleOp>
233 const auto nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
234 const auto nb_row_base_functions = row_data.getN().size2();
237 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->resCdStrain);
240 auto next = [&]() { ++t_c_dstrain; };
242 auto get_mat_scalar_dvector = [&]() {
243 if constexpr (DIM == 2)
248 &locMat(0, 0), &locMat(0, 1), &locMat(0, 2)};
251 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
252 auto t_row_base = row_data.getFTensor0N();
253 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
254 double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
259 ((t_c_dstrain(
k,
l)) * t_diff_grad_symmetrise(
k,
l,
i,
j));
262 auto t_mat = get_mat_scalar_dvector();
265 const double row_base = alpha * t_row_base;
266 auto t_col_diff_base = col_data.getFTensor1DiffN<DIM>(gg, 0);
268 t_mat(
i) += row_base * (t_res_mat(
i,
j) * t_col_diff_base(
j));
274 for (; rr != nb_row_base_functions; ++rr)