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