837 PenetrationInfo * pinfo = _penetration_locator._penetration_info[_current_node->id()];
845 mooseError(
"Unhandled ConstraintJacobianType");
847 case Moose::SlaveSlave:
855 RealVectorValue jac_vec;
858 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
859 jac_vec(i) = (*_jacobian)(dof_number, _connected_dof_indices[_j]);
861 return -pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) +
862 (_phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp]) *
868 return _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp] *
872 mooseError(
"Invalid contact formulation");
880 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
881 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
883 RealVectorValue jac_vec;
886 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
887 jac_vec(i) = (*_jacobian)(dof_number, _connected_dof_indices[_j]);
889 return -pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) +
890 (_phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp]) *
895 const Real curr_jac = (*_jacobian)(
896 _current_node->dof_number(0,
_vars[
_component], 0), _connected_dof_indices[_j]);
897 return -curr_jac + _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp];
903 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
904 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
905 return _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp] *
908 return _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp];
912 Real normal_comp = _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp] *
915 Real tang_comp = 0.0;
916 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
917 tang_comp = _phi_slave[_j][_qp] * penalty_slip * _test_slave[_i][_qp] *
919 return normal_comp + tang_comp;
924 RealVectorValue jac_vec;
927 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
928 jac_vec(i) = (*_jacobian)(dof_number, _connected_dof_indices[_j]);
930 Real normal_comp = -pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) +
931 (_phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp]) *
934 Real tang_comp = 0.0;
935 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
936 tang_comp = _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp] *
939 return normal_comp + tang_comp;
943 mooseError(
"Invalid contact formulation");
951 const Real curr_jac = (*_jacobian)(_current_node->dof_number(0,
_vars[
_component], 0),
952 _connected_dof_indices[_j]);
953 return -curr_jac + _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp];
958 return _phi_slave[_j][_qp] * penalty * _test_slave[_i][_qp];
961 mooseError(
"Invalid contact formulation");
964 mooseError(
"Invalid or unavailable contact model");
967 case Moose::SlaveMaster:
975 const Node * curr_master_node = _current_master->node_ptr(_j);
977 RealVectorValue jac_vec;
980 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
982 (*_jacobian)(dof_number, curr_master_node->dof_number(0,
_vars[
_component], 0));
984 return -pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) -
985 (_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp]) *
991 return -_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp] *
995 mooseError(
"Invalid contact formulation");
1003 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
1004 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
1006 const Node * curr_master_node = _current_master->node_ptr(_j);
1008 RealVectorValue jac_vec;
1011 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
1012 jac_vec(i) = (*_jacobian)(dof_number,
1015 return -pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) -
1016 (_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp]) *
1021 const Node * curr_master_node = _current_master->node_ptr(_j);
1022 const Real curr_jac =
1025 return -curr_jac - _phi_master[_j][_qp] * penalty * _test_slave[_i][_qp];
1031 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
1032 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
1033 return -_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp] *
1036 return -_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp];
1040 Real normal_comp = -_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp] *
1043 Real tang_comp = 0.0;
1044 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
1045 tang_comp = -_phi_master[_j][_qp] * penalty_slip * _test_slave[_i][_qp] *
1047 return normal_comp + tang_comp;
1052 const Node * curr_master_node = _current_master->node_ptr(_j);
1054 RealVectorValue jac_vec;
1057 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
1059 (*_jacobian)(dof_number, curr_master_node->dof_number(0,
_vars[
_component], 0));
1061 Real normal_comp = -pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) -
1062 (_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp]) *
1065 Real tang_comp = 0.0;
1066 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
1067 tang_comp = -_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp] *
1070 return normal_comp + tang_comp;
1074 mooseError(
"Invalid contact formulation");
1081 const Node * curr_master_node = _current_master->node_ptr(_j);
1082 const Real curr_jac =
1085 return -curr_jac - _phi_master[_j][_qp] * penalty * _test_slave[_i][_qp];
1090 return -_phi_master[_j][_qp] * penalty * _test_slave[_i][_qp];
1093 mooseError(
"Invalid contact formulation");
1097 mooseError(
"Invalid or unavailable contact model");
1100 case Moose::MasterSlave:
1108 RealVectorValue jac_vec;
1111 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
1112 jac_vec(i) = (*_jacobian)(dof_number, _connected_dof_indices[_j]);
1114 return pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) *
1115 _test_master[_i][_qp];
1120 return -_test_master[_i][_qp] * penalty * _phi_slave[_j][_qp] *
1124 mooseError(
"Invalid contact formulation");
1131 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
1132 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
1134 RealVectorValue jac_vec;
1137 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
1138 jac_vec(i) = (*_jacobian)(dof_number, _connected_dof_indices[_j]);
1140 return pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) *
1141 _test_master[_i][_qp];
1145 const Real slave_jac = (*_jacobian)(
1146 _current_node->dof_number(0,
_vars[
_component], 0), _connected_dof_indices[_j]);
1147 return slave_jac * _test_master[_i][_qp];
1153 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
1154 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
1155 return -_test_master[_i][_qp] * penalty * _phi_slave[_j][_qp] *
1158 return -_test_master[_i][_qp] * penalty * _phi_slave[_j][_qp];
1162 Real normal_comp = -_phi_slave[_j][_qp] * penalty * _test_master[_i][_qp] *
1165 Real tang_comp = 0.0;
1166 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
1167 tang_comp = -_phi_slave[_j][_qp] * penalty_slip * _test_master[_i][_qp] *
1169 return normal_comp + tang_comp;
1174 RealVectorValue jac_vec;
1177 dof_id_type dof_number = _current_node->dof_number(0,
_vars[i], 0);
1178 jac_vec(i) = (*_jacobian)(dof_number, _connected_dof_indices[_j]);
1181 pinfo->_normal(
_component) * (pinfo->_normal * jac_vec) * _test_master[_i][_qp];
1183 Real tang_comp = 0.0;
1184 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
1185 tang_comp = -_test_master[_i][_qp] * penalty * _phi_slave[_j][_qp] *
1188 return normal_comp + tang_comp;
1192 mooseError(
"Invalid contact formulation");
1200 const Real slave_jac = (*_jacobian)(
1201 _current_node->dof_number(0,
_vars[
_component], 0), _connected_dof_indices[_j]);
1202 return slave_jac * _test_master[_i][_qp];
1207 return -_test_master[_i][_qp] * penalty * _phi_slave[_j][_qp];
1210 mooseError(
"Invalid contact formulation");
1214 mooseError(
"Invalid or unavailable contact model");
1217 case Moose::MasterMaster:
1228 return _test_master[_i][_qp] * penalty * _phi_master[_j][_qp] *
1232 mooseError(
"Invalid contact formulation");
1244 if (pinfo->_mech_status == PenetrationInfo::MS_SLIPPING ||
1245 pinfo->_mech_status == PenetrationInfo::MS_SLIPPING_FRICTION)
1246 return _test_master[_i][_qp] * penalty * _phi_master[_j][_qp] *
1249 return _test_master[_i][_qp] * penalty * _phi_master[_j][_qp];
1254 Real tang_comp = 0.0;
1255 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
1256 tang_comp = _test_master[_i][_qp] * penalty * _phi_master[_j][_qp] *
1263 Real normal_comp = _phi_master[_j][_qp] * penalty * _test_master[_i][_qp] *
1266 Real tang_comp = 0.0;
1267 if (pinfo->_mech_status == PenetrationInfo::MS_STICKING)
1268 tang_comp = _phi_master[_j][_qp] * penalty_slip * _test_master[_i][_qp] *
1270 return normal_comp + tang_comp;
1274 mooseError(
"Invalid contact formulation");
1278 mooseError(
"Invalid or unavailable contact model");