136 int nb_integration_pts = row_data.
getN().size1();
137 int row_nb_dofs = row_data.
getIndices().size();
138 int col_nb_dofs = col_data.
getIndices().size();
144 &
m(
r + 0,
c + 0), &
m(
r + 0,
c + 1), &
m(
r + 0,
c + 2), &
m(
r + 0,
c + 3),
145 &
m(
r + 0,
c + 4), &
m(
r + 0,
c + 5),
147 &
m(
r + 1,
c + 0), &
m(
r + 1,
c + 1), &
m(
r + 1,
c + 2), &
m(
r + 1,
c + 3),
148 &
m(
r + 1,
c + 4), &
m(
r + 1,
c + 5),
150 &
m(
r + 2,
c + 0), &
m(
r + 2,
c + 1), &
m(
r + 2,
c + 2), &
m(
r + 2,
c + 3),
151 &
m(
r + 2,
c + 4), &
m(
r + 2,
c + 5),
153 &
m(
r + 3,
c + 0), &
m(
r + 3,
c + 1), &
m(
r + 3,
c + 2), &
m(
r + 3,
c + 3),
154 &
m(
r + 3,
c + 4), &
m(
r + 3,
c + 5),
156 &
m(
r + 4,
c + 0), &
m(
r + 4,
c + 1), &
m(
r + 4,
c + 2), &
m(
r + 4,
c + 3),
157 &
m(
r + 4,
c + 4), &
m(
r + 4,
c + 5),
159 &
m(
r + 5,
c + 0), &
m(
r + 5,
c + 1), &
m(
r + 5,
c + 2), &
m(
r + 5,
c + 3),
160 &
m(
r + 5,
c + 4), &
m(
r + 5,
c + 5)
171 auto v = getVolume();
172 auto t_w = getFTensor0IntegrationWeight();
174 auto get_dP = [&]() {
176 auto ts_a = getTSa();
178 auto t_P = getFTensor2FromMat<3, 3>(
dataAtPts->PAtPts);
179 auto r_P_du = getFTensor4FromMat<3, 3, 3, 3>(
dataAtPts->P_du);
180 auto t_approx_P_adjont_dstretch =
181 getFTensor2FromMat<3, 3>(
dataAtPts->adjointPdstretchAtPts);
183 getFTensor2SymmetricFromMat<3>(
dataAtPts->logStretchDotTensorAtPts);
184 auto t_u = getFTensor2SymmetricFromMat<3>(
dataAtPts->stretchTensorAtPts);
186 getFTensor4DdgFromMat<3, 3, 1>(
dataAtPts->diffStretchTensorAtPts);
187 auto t_eigen_vals = getFTensor1FromMat<3>(
dataAtPts->eigenVals);
188 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(
dataAtPts->eigenVecs);
191 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(
dP);
192 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
195 t_deltaP(
i,
j) = t_approx_P_adjont_dstretch(
i,
j) - t_P(
i,
j);
198 t_Ldiff_u(
i,
j,
L) = t_diff_u(
i,
j,
m,
n) * t_L(
m,
n,
L);
200 -t_Ldiff_u(
i,
j,
L) * (r_P_du(
i,
j,
k,
l) * t_Ldiff_u(
k,
l,
J));
203 (t_L(
i,
j,
L) * (t_diff(
i,
j,
k,
l) * t_L(
k,
l,
J)));
207 t_deltaP_sym(
i,
j) = (t_deltaP(
i,
j) || t_deltaP(
j,
i));
208 t_deltaP_sym(
i,
j) /= 2.0;
212 t_dP(
L,
J) += t_L(
i,
j,
L) * (t_diff2_uP2(
i,
j,
k,
l) * t_L(
k,
l,
J));
218 ++t_approx_P_adjont_dstretch;
226 return getFTensor2FromMat<size_symm, size_symm>(
dP);
229 int row_nb_base_functions = row_data.
getN().size2();
232 auto t_dP = get_dP();
233 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
237 for (; rr != row_nb_dofs / 6; ++rr) {
239 auto t_m = get_ftensor2(
K, 6 * rr, 0);
240 for (
int cc = 0; cc != col_nb_dofs / 6; ++cc) {
241 const double b =
a * t_row_base_fun * t_col_base_fun;
242 t_m(
L,
J) += b * t_dP(
L,
J);
249 for (; rr != row_nb_base_functions; ++rr) {