683 {
685
690
691 const size_t nb_gauss_pts = OP::getGaussPts().size2();
692
693#ifndef NDEBUG
696 "Wrong number of integration pts %ld != %ld",
698 }
699#endif
700
701 auto &nf = OP::locF;
702 OP::locF.clear();
703
704 auto t_w = OP::getFTensor0IntegrationWeight();
705 auto t_material_normal = OP::getFTensor1NormalsAtGaussPts();
706 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
707
708 auto t_disp = getFTensor1FromMat<3>(
commonDataPtr->contactDisp);
709 auto t_traction = getFTensor1FromMat<3>(
commonDataPtr->contactTraction);
710
711 auto next = [&]() {
712 ++t_w;
713 ++t_disp;
714 ++t_traction;
715 ++t_coords;
716 ++t_material_normal;
717 };
718
719 auto face_data_vec_ptr =
721 auto face_gauss_pts_it = face_data_vec_ptr->begin();
722
723 auto nb_base_functions = data.getN().size2() / 3;
724 auto t_base = data.getFTensor1N<3>();
725 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
726
727 auto t_nf = getFTensor1FromPtr<3>(&nf[0]);
728 const double alpha = t_w / 2.;
729
730 size_t bb = 0;
731 for (; bb != OP::nbRows / 3; ++bb) {
732 const double beta = alpha * t_base(
i) * t_material_normal(
i);
733 t_nf(
i) += beta * t_disp(
i);
734 ++t_nf;
735 ++t_base;
736 }
737 for (; bb < nb_base_functions; ++bb)
738 ++t_base;
739
740 next();
741 }
742
744}
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k