358 {
360
361 const size_t nb_gauss_pts = getGaussPts().size2();
362 auto &locMat = AssemblyBoundaryEleOp::locMat;
363
364 auto t_normal = getFTensor1Normal();
365 t_normal(
i) /= sqrt(t_normal(
j) * t_normal(
j));
366
367 auto t_disp = getFTensor1FromMat<SPACE_DIM>(
commonDataPtr->contactDisp);
368 auto t_traction =
369 getFTensor1FromMat<SPACE_DIM>(
commonDataPtr->contactTraction);
370 auto t_coords = getFTensor1CoordsAtGaussPts();
371
372 auto t_w = getFTensor0IntegrationWeight();
373 auto t_row_base = row_data.getFTensor1N<3>();
374 size_t nb_face_functions = row_data.getN().size2() / 3;
375
377
378 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
379
380 const double alpha = t_w * getMeasure();
381
383 t_spatial_coords(
i) = t_coords(
i) + t_disp(
i);
384
388 getTStime(), t_spatial_coords, t_traction);
389
390 auto tn = -t_traction(
i) * t_grad_sdf(
i);
392
394 t_cP(
i,
j) = (
c * t_grad_sdf(
i)) * t_grad_sdf(
j);
397
401
404 getTStime(), t_spatial_coords, t_traction);
406 (
c *
cn) * (t_hess_sdf(
i,
j) * (t_grad_sdf(
k) * t_traction(
k)) +
407 t_grad_sdf(
i) * t_hess_sdf(
k,
j) * t_traction(
k)) +
408 c *
sdf * t_hess_sdf(
i,
j);
409 }
410
411 size_t rr = 0;
412 for (; rr != AssemblyBoundaryEleOp::nbRows /
SPACE_DIM; ++rr) {
413
414 auto t_mat = getFTensor2FromArray<SPACE_DIM, SPACE_DIM, SPACE_DIM>(
416
417 const double row_base = t_row_base(
i) * t_normal(
i);
418
419 auto t_col_base = col_data.getFTensor0N(gg, 0);
420 for (
size_t cc = 0; cc != AssemblyBoundaryEleOp::nbCols /
SPACE_DIM;
421 ++cc) {
422 const double beta =
alpha * row_base * t_col_base;
423
424 t_mat(
i,
j) -= beta * t_res_dU(
i,
j);
425
426 ++t_col_base;
427 ++t_mat;
428 }
429
430 ++t_row_base;
431 }
432 for (; rr < nb_face_functions; ++rr)
433 ++t_row_base;
434
435 ++t_disp;
436 ++t_traction;
437 ++t_coords;
438 ++t_w;
439 }
440
442}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
const double c
speed of light (cm/ns)
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.