279 {
281
282 const size_t nb_gauss_pts = AssemblyBoundaryEleOp::getGaussPts().size2();
283
284 auto &nf = AssemblyBoundaryEleOp::locF;
285
286 auto t_normal = getFTensor1Normal();
287 t_normal(
i) /= sqrt(t_normal(
j) * t_normal(
j));
288
289 auto t_w = getFTensor0IntegrationWeight();
290 auto t_disp = getFTensor1FromMat<SPACE_DIM>(
commonDataPtr->contactDisp);
291 auto t_traction =
292 getFTensor1FromMat<SPACE_DIM>(
commonDataPtr->contactTraction);
293 auto t_coords = getFTensor1CoordsAtGaussPts();
294
295 size_t nb_base_functions = data.getN().size2() / 3;
296 auto t_base = data.getFTensor1N<3>();
297 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
298
299 auto t_nf = getFTensor1FromPtr<SPACE_DIM>(&nf[0]);
300 const double alpha = t_w * getMeasure();
301
303 t_spatial_coords(
i) = t_coords(
i) + t_disp(
i);
304
308 getTStime(), t_spatial_coords, t_traction);
309 auto tn = -t_traction(
i) * t_grad_sdf(
i);
311
313 t_cP(
i,
j) = (
c * t_grad_sdf(
i)) * t_grad_sdf(
j);
316
319
320 t_cQ(
i,
j) * (t_disp(
j) -
cn * t_traction(
j))
321
322 +
323
324 t_cP(
i,
j) * t_disp(
j) +
325 c * (
sdf * t_grad_sdf(
i));
326
327 size_t bb = 0;
328 for (; bb != AssemblyBoundaryEleOp::nbRows /
SPACE_DIM; ++bb) {
329 const double beta =
alpha * (t_base(
i) * t_normal(
i));
330 t_nf(
i) -= beta * t_rhs(
i);
331
332 ++t_nf;
333 ++t_base;
334 }
335 for (; bb < nb_base_functions; ++bb)
336 ++t_base;
337
338 ++t_disp;
339 ++t_traction;
340 ++t_coords;
341 ++t_w;
342 }
343
345}
#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.