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