753                                                                    {
  755 
  756  const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
  762 
  763  sdf_vec.resize(nb_gauss_pts, false);
  764  grad_mat.resize(DIM, nb_gauss_pts, false);
  765  hess_mat.resize((DIM * (DIM + 1)) / 2, nb_gauss_pts, false);
  766  constraint_vec.resize(nb_gauss_pts, false);
  767 
  768  auto t_traction = getFTensor1FromMat<DIM>(contactTraction_mat);
  769 
  770  auto t_sdf = getFTensor0FromVec(sdf_vec);
  771  auto t_grad_sdf = getFTensor1FromMat<DIM>(grad_mat);
  772  auto t_hess_sdf = getFTensor2SymmetricFromMat<DIM>(hess_mat);
  773  auto t_constraint = getFTensor0FromVec(constraint_vec);
  774 
  775  auto t_disp = getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp);
 
  776  auto t_coords = BoundaryEleOp::getFTensor1CoordsAtGaussPts();
  777  auto t_normal_at_pts = BoundaryEleOp::getFTensor1NormalsAtGaussPts();
  778 
  781 
  782  auto ts_time = BoundaryEleOp::getTStime();
  783  auto ts_time_step = BoundaryEleOp::getTStimeStep();
  784 
  786      BoundaryEleOp::getFTensor1CoordsAtGaussPts(),
  787      getFTensor1FromMat<DIM>(
commonDataPtr->contactDisp), nb_gauss_pts);
 
  789      BoundaryEleOp::getFTensor1NormalsAtGaussPts(), nb_gauss_pts);
  790 
  791  
  792  int block_id = 0;
  793 
  794  auto v_sdf =
  796                              m_spatial_coords, m_normals_at_pts, block_id);
  797 
  798  auto m_grad_sdf =
  800                                  m_spatial_coords, m_normals_at_pts, block_id);
  801 
  802  auto m_hess_sdf =
  804                                  m_spatial_coords, m_normals_at_pts, block_id);
  805 
  806  auto t_sdf_v = getFTensor0FromVec(v_sdf);
  807  auto t_grad_sdf_v = getFTensor1FromMat<3>(m_grad_sdf);
  808  auto t_hess_sdf_v = getFTensor2SymmetricFromMat<3>(m_hess_sdf);
  809 
  810  auto next = [&]() {
  811    ++t_sdf;
  812    ++t_sdf_v;
  813    ++t_grad_sdf;
  814    ++t_grad_sdf_v;
  815    ++t_hess_sdf;
  816    ++t_hess_sdf_v;
  817    ++t_disp;
  818    ++t_traction;
  819    ++t_constraint;
  820  };
  821 
  822  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
  823 
  824    auto tn = -t_traction(
i) * t_grad_sdf_v(
i);
 
  826 
  827    t_sdf = t_sdf_v;
  828    t_grad_sdf(
i) = t_grad_sdf_v(
i);
 
  829    t_hess_sdf(
i, 
j) = t_hess_sdf_v(
i, 
j);
 
  831 
  832    next();
  833  }
  834 
  836}
#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