657 {
659
664
665 const size_t nb_gauss_pts = AssemblyBoundaryEleOp::getGaussPts().size2();
666
668
669 auto t_w = AssemblyBoundaryEleOp::getFTensor0IntegrationWeight();
670 auto t_disp = getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp);
671 auto t_traction = getFTensor1FromMat<DIM>(
commonDataPtr->contactTraction);
672 auto t_coords = AssemblyBoundaryEleOp::getFTensor1CoordsAtGaussPts();
673
674 size_t nb_base_functions = data.getN().size2() / 3;
675 auto t_base = data.getFTensor1N<3>();
676
678 BoundaryEleOp::getFTensor1CoordsAtGaussPts(),
679 getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp), nb_gauss_pts);
681 BoundaryEleOp::getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
682
683 auto t_normal = getFTensor1FromMat<3>(m_normals_at_pts);
684
685 auto ts_time = AssemblyBoundaryEleOp::getTStime();
686 auto ts_time_step = AssemblyBoundaryEleOp::getTStimeStep();
687
688
689 int block_id = 0;
690
691 auto v_sdf =
693 m_spatial_coords, m_normals_at_pts, block_id);
694
695 auto m_grad_sdf =
697 m_spatial_coords, m_normals_at_pts, block_id);
698
699 auto t_sdf = getFTensor0FromVec(v_sdf);
700 auto t_grad_sdf = getFTensor1FromMat<3>(m_grad_sdf);
701
702 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
703
704 auto t_nf = getFTensor1FromPtr<DIM>(&nf[0]);
705
709 }
710 const double alpha = t_w *
jacobian * AssemblyBoundaryEleOp::getMeasure();
711
712 auto tn = -t_traction(
i) * t_grad_sdf(
i);
714
716 t_cP(
i,
j) = (
c * t_grad_sdf(
i)) * t_grad_sdf(
j);
719
722
724
725 +
726
727 t_cP(
i,
j) * t_disp(
j) +
728 c * (t_sdf * t_grad_sdf(
i));
729
730 size_t bb = 0;
732 const double beta = alpha * (t_base(
i) * t_normal(
i));
733 t_nf(
i) -= beta * t_rhs(
i);
734
735 ++t_nf;
736 ++t_base;
737 }
738 for (; bb < nb_base_functions; ++bb)
739 ++t_base;
740
741 ++t_disp;
742 ++t_traction;
743 ++t_coords;
744 ++t_w;
745 ++t_normal;
746 ++t_sdf;
747 ++t_grad_sdf;
748 }
749
751}
SmartPetscObj< Mat > jacobian
#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()
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.
VectorDouble locF
local entity vector
int nbRows
number of dofs on rows