708 {
710
711 auto fe_type = BoundaryEleOp::getFEType();
712
713 const auto fe_ent = BoundaryEleOp::getFEEntityHandle();
714
719
720 auto t_w = BoundaryEleOp::getFTensor0IntegrationWeight();
721 auto t_traction = getFTensor1FromMat<DIM>(
commonDataPtr->contactTraction);
722 auto t_coords = BoundaryEleOp::getFTensor1CoordsAtGaussPts();
723
724 auto t_grad = getFTensor2FromMat<DIM, DIM>(
commonDataPtr->contactDispGrad);
725 auto t_normal_at_pts = BoundaryEleOp::getFTensor1NormalsAtGaussPts();
726
727 const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
729 BoundaryEleOp::getFTensor1CoordsAtGaussPts(),
730 getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp), nb_gauss_pts);
732 BoundaryEleOp::getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
733
734 auto ts_time = BoundaryEleOp::getTStime();
735 auto ts_time_step = BoundaryEleOp::getTStimeStep();
736 int block_id = 0;
737 auto v_sdf =
739 m_spatial_coords, m_normals_at_pts, block_id);
741 ts_time_step, ts_time, nb_gauss_pts, m_spatial_coords, m_normals_at_pts,
742 block_id);
743 auto t_sdf = getFTensor0FromVec(v_sdf);
744 auto t_grad_sdf = getFTensor1FromMat<3>(m_grad_sdf);
745 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
749 }
750 auto tn = -t_traction(
i) * t_grad_sdf(
i);
753
757
759 auto det = determinantTensor(
F);
760 CHKERR invertTensor(
F, det, invF);
761 t_normal_current(
i) = det * (invF(
j,
i) * t_normal_at_pts(
j));
762
763 alpha *= sqrt(t_normal_current(
i) * t_normal_current(
i));
764
765 if (fe_type == MBTRI) {
766 alpha /= 2;
767 }
769 t_sum_a(0) += alpha;
770 }
771 t_sum_a(1) += alpha;
772 ++t_w;
773 ++t_traction;
774 ++t_coords;
775 ++t_sdf;
776 ++t_grad_sdf;
777
778 ++t_grad;
779 ++t_normal_at_pts;
780 }
783 ADD_VALUES);
784 }
786}
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()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
FTensor::Index< 'j', 3 > j
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.