785 {
787
788 const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
794
795 sdf_vec.resize(nb_gauss_pts, false);
796 grad_mat.resize(DIM, nb_gauss_pts, false);
797 hess_mat.resize((DIM * (DIM + 1)) / 2, nb_gauss_pts, false);
798 constraint_vec.resize(nb_gauss_pts, false);
799
800 auto t_traction = getFTensor1FromMat<DIM>(contactTraction_mat);
801
802 auto t_sdf = getFTensor0FromVec(sdf_vec);
803 auto t_grad_sdf = getFTensor1FromMat<DIM>(grad_mat);
804 auto t_hess_sdf = getFTensor2SymmetricFromMat<DIM>(hess_mat);
805 auto t_constraint = getFTensor0FromVec(constraint_vec);
806
807 auto t_disp = getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp);
808 auto t_coords = BoundaryEleOp::getFTensor1CoordsAtGaussPts();
809 auto t_normal_at_pts = BoundaryEleOp::getFTensor1NormalsAtGaussPts();
810
813
814 auto ts_time = BoundaryEleOp::getTStime();
815 auto ts_time_step = BoundaryEleOp::getTStimeStep();
816
818 BoundaryEleOp::getFTensor1CoordsAtGaussPts(),
819 getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp), nb_gauss_pts);
821 BoundaryEleOp::getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
822
823
824 int block_id = 0;
825
826 auto v_sdf =
828 m_spatial_coords, m_normals_at_pts, block_id);
829
830 auto m_grad_sdf =
832 m_spatial_coords, m_normals_at_pts, block_id);
833
834 auto m_hess_sdf =
836 m_spatial_coords, m_normals_at_pts, block_id);
837
838 auto t_sdf_v = getFTensor0FromVec(v_sdf);
839 auto t_grad_sdf_v = getFTensor1FromMat<3>(m_grad_sdf);
840 auto t_hess_sdf_v = getFTensor2SymmetricFromMat<3>(m_hess_sdf);
841
842 auto next = [&]() {
843 ++t_sdf;
844 ++t_sdf_v;
845 ++t_grad_sdf;
846 ++t_grad_sdf_v;
847 ++t_hess_sdf;
848 ++t_hess_sdf_v;
849 ++t_disp;
850 ++t_traction;
851 ++t_constraint;
852 };
853
854 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
855
856 auto tn = -t_traction(
i) * t_grad_sdf_v(
i);
858
859 t_sdf = t_sdf_v;
860 t_grad_sdf(
i) = t_grad_sdf_v(
i);
861 t_hess_sdf(
i,
j) = t_hess_sdf_v(
i,
j);
863
864 next();
865 }
866
868}
#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