881 {
883
888
889 const size_t nb_gauss_pts = AssemblyBoundaryEleOp::getGaussPts().size2();
890
891 auto &nf = AssemblyBoundaryEleOp::locF;
892
893 auto t_normal_at_pts = AssemblyBoundaryEleOp::getFTensor1NormalsAtGaussPts();
894
895 auto t_w = AssemblyBoundaryEleOp::getFTensor0IntegrationWeight();
896 auto t_disp = getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp);
897 auto t_traction = getFTensor1FromMat<DIM>(
commonDataPtr->contactTraction);
898 auto t_coords = AssemblyBoundaryEleOp::getFTensor1CoordsAtGaussPts();
899
900 size_t nb_base_functions = data.getN().size2() / 3;
901 auto t_base = data.getFTensor1N<3>();
902
904 BoundaryEleOp::getFTensor1CoordsAtGaussPts(),
905 getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp), nb_gauss_pts);
907 BoundaryEleOp::getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
908
909 auto t_normal = getFTensor1FromMat<3>(m_normals_at_pts);
910
911 auto ts_time = AssemblyBoundaryEleOp::getTStime();
912 auto ts_time_step = AssemblyBoundaryEleOp::getTStimeStep();
913
914
915 int block_id = 0;
916
917 auto v_sdf =
919 m_spatial_coords, m_normals_at_pts, block_id);
920
921 auto m_grad_sdf =
923 m_spatial_coords, m_normals_at_pts, block_id);
924
925 auto t_sdf = getFTensor0FromVec(v_sdf);
926 auto t_grad_sdf = getFTensor1FromMat<3>(m_grad_sdf);
927
928 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
929
930 auto t_nf = getFTensor1FromPtr<DIM>(&nf[0]);
931
932 double jacobian = 1.;
934 jacobian = 2. * M_PI * t_coords(0);
935 }
936 const double alpha = t_w * jacobian * AssemblyBoundaryEleOp::getMeasure();
937
938 auto tn = -t_traction(
i) * t_grad_sdf(
i);
940
942 t_cP(
i,
j) = (
c * t_grad_sdf(
i)) * t_grad_sdf(
j);
945
948
950
951 +
952
953 t_cP(
i,
j) * t_disp(
j) +
954 c * (t_sdf * t_grad_sdf(
i));
955
956 size_t bb = 0;
957 for (; bb != AssemblyBoundaryEleOp::nbRows / DIM; ++bb) {
958 const double beta = alpha * (t_base(
i) * t_normal(
i));
959 t_nf(
i) -= beta * t_rhs(
i);
960
961 ++t_nf;
962 ++t_base;
963 }
964 for (; bb < nb_base_functions; ++bb)
965 ++t_base;
966
967 ++t_disp;
968 ++t_traction;
969 ++t_coords;
970 ++t_w;
971 ++t_normal;
972 ++t_sdf;
973 ++t_grad_sdf;
974 }
975
977}
#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.