883 {
885
886
887
888
890
894
895 auto nb_rows = row_data.getIndices().size();
896 auto nb_cols = col_data.getIndices().size();
897
898 auto &locMat = AssemblyBoundaryEleOp::locMat;
899 locMat.resize(nb_rows, nb_cols, false);
900 locMat.clear();
901
902 if (nb_cols && nb_rows) {
903
904 const size_t nb_gauss_pts = OP::getGaussPts().size2();
905
906 auto t_w = OP::getFTensor0IntegrationWeight();
907 auto t_disp = getFTensor1FromMat<3>(
commonDataPtr->contactDisp);
908 auto t_traction = getFTensor1FromMat<3>(
commonDataPtr->contactTraction);
909 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
910 auto t_material_normal = OP::getFTensor1NormalsAtGaussPts();
911
912 auto next = [&]() {
913 ++t_w;
914 ++t_disp;
915 ++t_traction;
916 ++t_coords;
917 ++t_material_normal;
918 };
919
921
922 auto face_data_vec_ptr =
924 auto face_gauss_pts_it = face_data_vec_ptr->begin();
925
926 auto t_row_base = row_data.getFTensor1N<3>();
927 auto nb_face_functions = row_data.getN().size2() / 3;
928 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
929
930 const auto alpha = t_w / 2.;
931
932 size_t rr = 0;
933 for (; rr != nb_rows / 3; ++rr) {
934
935 auto row_base = alpha * (t_row_base(
i) * t_material_normal(
i));
936
937 auto t_mat = getFTensor2FromArray<3, 3, 3>(locMat, 3 * rr);
938 auto t_col_base = col_data.getFTensor0N(gg, 0);
939
940 for (size_t cc = 0; cc != nb_cols / 3; ++cc) {
941 const auto beta = row_base * t_col_base;
943 ++t_col_base;
944 ++t_mat;
945 }
946
947 ++t_row_base;
948 }
949 for (; rr < nb_face_functions; ++rr)
950 ++t_row_base;
951
952 next();
953 }
954 }
955
956 locMat = trans(locMat);
957
959}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
[Define dimension]
#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
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k