本文整理汇总了C++中PenetrationInfo::_incremental_slip方法的典型用法代码示例。如果您正苦于以下问题:C++ PenetrationInfo::_incremental_slip方法的具体用法?C++ PenetrationInfo::_incremental_slip怎么用?C++ PenetrationInfo::_incremental_slip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PenetrationInfo
的用法示例。
在下文中一共展示了PenetrationInfo::_incremental_slip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: retVal
Real
PenetrationAux::computeValue()
{
const Node * current_node = NULL;
if (_nodal)
current_node = _current_node;
else
current_node = _mesh.getQuadratureNode(_current_elem, _current_side, _qp);
PenetrationInfo * pinfo = _penetration_locator._penetration_info[current_node->id()];
Real retVal(NotPenetrated);
if (pinfo)
switch (_quantity)
{
case PA_DISTANCE:
retVal = pinfo->_distance;
break;
case PA_TANG_DISTANCE:
retVal = pinfo->_tangential_distance;
break;
case PA_NORMAL_X:
retVal = pinfo->_normal(0);
break;
case PA_NORMAL_Y:
retVal = pinfo->_normal(1);
break;
case PA_NORMAL_Z:
retVal = pinfo->_normal(2);
break;
case PA_CLOSEST_POINT_X:
retVal = pinfo->_closest_point(0);
break;
case PA_CLOSEST_POINT_Y:
retVal = pinfo->_closest_point(1);
break;
case PA_CLOSEST_POINT_Z:
retVal = pinfo->_closest_point(2);
break;
case PA_ELEM_ID:
retVal = static_cast<Real>(pinfo->_elem->id() + 1);
break;
case PA_SIDE:
retVal = static_cast<Real>(pinfo->_side_num);
break;
case PA_INCREMENTAL_SLIP_MAG:
retVal = pinfo->isCaptured() ? pinfo->_incremental_slip.norm() : 0;
break;
case PA_INCREMENTAL_SLIP_X:
retVal = pinfo->isCaptured() ? pinfo->_incremental_slip(0) : 0;
break;
case PA_INCREMENTAL_SLIP_Y:
retVal = pinfo->isCaptured() ? pinfo->_incremental_slip(1) : 0;
break;
case PA_INCREMENTAL_SLIP_Z:
retVal = pinfo->isCaptured() ? pinfo->_incremental_slip(2) : 0;
break;
case PA_ACCUMULATED_SLIP:
retVal = pinfo->_accumulated_slip;
break;
case PA_FORCE_X:
retVal = pinfo->_contact_force(0);
break;
case PA_FORCE_Y:
retVal = pinfo->_contact_force(1);
break;
case PA_FORCE_Z:
retVal = pinfo->_contact_force(2);
break;
case PA_NORMAL_FORCE_MAG:
retVal = -pinfo->_contact_force * pinfo->_normal;
break;
case PA_NORMAL_FORCE_X:
retVal = (pinfo->_contact_force * pinfo->_normal) * pinfo->_normal(0);
break;
case PA_NORMAL_FORCE_Y:
retVal = (pinfo->_contact_force * pinfo->_normal) * pinfo->_normal(1);
break;
case PA_NORMAL_FORCE_Z:
retVal = (pinfo->_contact_force * pinfo->_normal) * pinfo->_normal(2);
break;
case PA_TANGENTIAL_FORCE_MAG:
{
RealVectorValue contact_force_normal((pinfo->_contact_force * pinfo->_normal) *
pinfo->_normal);
RealVectorValue contact_force_tangential(pinfo->_contact_force - contact_force_normal);
retVal = contact_force_tangential.norm();
break;
}
case PA_TANGENTIAL_FORCE_X:
retVal =
pinfo->_contact_force(0) - (pinfo->_contact_force * pinfo->_normal) * pinfo->_normal(0);
break;
case PA_TANGENTIAL_FORCE_Y:
retVal =
pinfo->_contact_force(1) - (pinfo->_contact_force * pinfo->_normal) * pinfo->_normal(1);
break;
case PA_TANGENTIAL_FORCE_Z:
//.........这里部分代码省略.........