本文整理汇总了C++中PenetrationInfo::capture方法的典型用法代码示例。如果您正苦于以下问题:C++ PenetrationInfo::capture方法的具体用法?C++ PenetrationInfo::capture怎么用?C++ PenetrationInfo::capture使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PenetrationInfo
的用法示例。
在下文中一共展示了PenetrationInfo::capture方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
ContactMaster::updateContactSet(bool beginning_of_step)
{
std::map<dof_id_type, PenetrationInfo *>::iterator
it = _penetration_locator._penetration_info.begin(),
end = _penetration_locator._penetration_info.end();
for (; it!=end; ++it)
{
const dof_id_type slave_node_num = it->first;
PenetrationInfo * pinfo = it->second;
// Skip this pinfo if there are no DOFs on this node.
if ( ! pinfo || pinfo->_node->n_comp(_sys.number(), _vars(_component)) < 1 )
continue;
if (beginning_of_step)
{
pinfo->_locked_this_step = 0;
pinfo->_starting_elem = it->second->_elem;
pinfo->_starting_side_num = it->second->_side_num;
pinfo->_starting_closest_point_ref = it->second->_closest_point_ref;
pinfo->_contact_force_old = pinfo->_contact_force;
pinfo->_accumulated_slip_old = pinfo->_accumulated_slip;
pinfo->_frictional_energy_old = pinfo->_frictional_energy;
}
const Real contact_pressure = -(pinfo->_normal * pinfo->_contact_force) / nodalArea(*pinfo);
const Real distance = pinfo->_normal * (pinfo->_closest_point - _mesh.node(slave_node_num));
// Capture
if ( ! pinfo->isCaptured() && MooseUtils::absoluteFuzzyGreaterEqual(distance, 0, _capture_tolerance))
{
pinfo->capture();
// Increment the lock count every time the node comes back into contact from not being in contact.
if (_formulation == CF_KINEMATIC)
++pinfo->_locked_this_step;
}
// Release
else if (_model != CM_GLUED &&
pinfo->isCaptured() &&
_tension_release >= 0 &&
-contact_pressure >= _tension_release &&
pinfo->_locked_this_step < 2)
{
pinfo->release();
pinfo->_contact_force.zero();
}
if (_formulation == CF_AUGMENTED_LAGRANGE && pinfo->isCaptured())
pinfo->_lagrange_multiplier -= getPenalty(*pinfo) * distance;
}
}