892 {
894
898
899 const size_t nb_gauss_pts = AssemblyBoundaryEleOp::getGaussPts().size2();
901
902 auto t_traction = getFTensor1FromMat<DIM>(
commonDataPtr->contactTraction);
903 auto t_coords = AssemblyBoundaryEleOp::getFTensor1CoordsAtGaussPts();
904
905 auto t_w = AssemblyBoundaryEleOp::getFTensor0IntegrationWeight();
906 auto t_row_base = row_data.getFTensor1N<3>();
907 size_t nb_face_functions = row_data.getN().size2() / 3;
908
910 BoundaryEleOp::getFTensor1CoordsAtGaussPts(),
911 getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp), nb_gauss_pts);
913 BoundaryEleOp::getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
914
915 auto t_normal = getFTensor1FromMat<3>(m_normals_at_pts);
916
917 auto ts_time = AssemblyBoundaryEleOp::getTStime();
918 auto ts_time_step = AssemblyBoundaryEleOp::getTStimeStep();
919
920
921 int block_id = 0;
922
923 auto v_sdf =
925 m_spatial_coords, m_normals_at_pts, block_id);
926
927 auto m_grad_sdf =
929 m_spatial_coords, m_normals_at_pts, block_id);
930
931 auto t_sdf = getFTensor0FromVec(v_sdf);
932 auto t_grad_sdf = getFTensor1FromMat<3>(m_grad_sdf);
933
934 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
935
939 }
940 const double alpha = t_w *
jacobian * AssemblyBoundaryEleOp::getMeasure();
941
942 auto tn = -t_traction(
i) * t_grad_sdf(
i);
944
946 t_cP(
i,
j) = (
c * t_grad_sdf(
i)) * t_grad_sdf(
j);
949
952
953 size_t rr = 0;
955
956 auto t_mat = getFTensor2FromArray<DIM, DIM, DIM>(locMat, DIM * rr);
957 const double row_base = t_row_base(
i) * t_normal(
i);
958
959 auto t_col_base = col_data.getFTensor1N<3>(gg, 0);
961 const double col_base = t_col_base(
i) * t_normal(
i);
962 const double beta = alpha * row_base * col_base;
963
964 t_mat(
i,
j) -= beta * t_res_dt(
i,
j);
965
966 ++t_col_base;
967 ++t_mat;
968 }
969
970 ++t_row_base;
971 }
972 for (; rr < nb_face_functions; ++rr)
973 ++t_row_base;
974
975 ++t_traction;
976 ++t_coords;
977 ++t_w;
978 ++t_normal;
979 ++t_sdf;
980 ++t_grad_sdf;
981 }
982
984}
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< '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.
int nbRows
number of dofs on rows
MatrixDouble locMat
local entity block matrix
int nbCols
number if dof on column