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