A OneDContactConstraint forces the value of a variable to be the same on both sides of an interface.
More...
#include <OneDContactConstraint.h>
A OneDContactConstraint forces the value of a variable to be the same on both sides of an interface.
Definition at line 26 of file OneDContactConstraint.h.
◆ OneDContactConstraint()
OneDContactConstraint::OneDContactConstraint |
( |
const InputParameters & |
parameters | ) |
|
◆ ~OneDContactConstraint()
virtual OneDContactConstraint::~OneDContactConstraint |
( |
| ) |
|
|
inlinevirtual |
◆ computeQpJacobian()
Real OneDContactConstraint::computeQpJacobian |
( |
Moose::ConstraintJacobianType |
type | ) |
|
|
virtual |
Definition at line 121 of file OneDContactConstraint.C.
123 double slave_jac = 0;
126 case Moose::SlaveSlave:
127 return _phi_slave[_j][_qp] * _test_slave[_i][_qp];
128 case Moose::SlaveMaster:
129 return -_phi_master[_j][_qp] * _test_slave[_i][_qp];
130 case Moose::MasterSlave:
132 (*_jacobian)(_current_node->dof_number(0, _var.number(), 0), _connected_dof_indices[_j]);
133 return slave_jac * _test_master[_i][_qp];
134 case Moose::MasterMaster:
◆ computeQpResidual()
Real OneDContactConstraint::computeQpResidual |
( |
Moose::ConstraintType |
type | ) |
|
|
virtual |
Definition at line 104 of file OneDContactConstraint.C.
106 PenetrationInfo * pinfo = _penetration_locator._penetration_info[_current_node->id()];
112 return ((*_current_node)(0) - pinfo->_closest_point(0)) * _test_slave[_i][_qp];
114 double slave_resid =
_residual_copy(_current_node->dof_number(0, _var.number(), 0));
115 return slave_resid * _test_master[_i][_qp];
◆ computeQpSlaveValue()
Real OneDContactConstraint::computeQpSlaveValue |
( |
| ) |
|
|
virtual |
Definition at line 90 of file OneDContactConstraint.C.
92 PenetrationInfo * pinfo = _penetration_locator._penetration_info[_current_node->id()];
93 Moose::err << std::endl
94 <<
"Popping out node: " << _current_node->id() << std::endl
95 <<
"Closest Point x: " << pinfo->_closest_point(0) << std::endl
96 <<
"Current Node x: " << (*_current_node)(0) << std::endl
97 <<
"Current Value: " << _u_slave[_qp] << std::endl
100 return pinfo->_closest_point(0) - ((*_current_node)(0) - _u_slave[_qp]);
◆ jacobianSetup()
void OneDContactConstraint::jacobianSetup |
( |
| ) |
|
|
virtual |
◆ shouldApply()
bool OneDContactConstraint::shouldApply |
( |
| ) |
|
Definition at line 82 of file OneDContactConstraint.C.
84 std::set<dof_id_type>::iterator hpit =
85 _penetration_locator._has_penetrated.find(_current_node->id());
86 return (hpit != _penetration_locator._has_penetrated.end());
◆ timestepSetup()
void OneDContactConstraint::timestepSetup |
( |
| ) |
|
|
virtual |
◆ updateContactSet()
void OneDContactConstraint::updateContactSet |
( |
| ) |
|
|
virtual |
Definition at line 57 of file OneDContactConstraint.C.
Referenced by jacobianSetup(), and timestepSetup().
59 std::set<dof_id_type> & has_penetrated = _penetration_locator._has_penetrated;
61 std::map<dof_id_type, PenetrationInfo *>::iterator
62 it = _penetration_locator._penetration_info.begin(),
63 end = _penetration_locator._penetration_info.end();
65 for (; it != end; ++it)
67 PenetrationInfo * pinfo = it->second;
70 if (!pinfo || pinfo->_node->n_comp(_sys.number(), _var.number()) < 1)
73 if (pinfo->_distance > 0)
75 dof_id_type slave_node_num = it->first;
76 has_penetrated.insert(slave_node_num);
◆ _jacobian_update
bool OneDContactConstraint::_jacobian_update |
|
protected |
◆ _residual_copy
NumericVector<Number>& OneDContactConstraint::_residual_copy |
|
protected |
The documentation for this class was generated from the following files: