|
OOFEM 3.0
|
Represents a contact interaction between a master and a slave contact point. More...
#include <contactpair.h>
Public Member Functions | |
| ContactPair (std::unique_ptr< ContactPoint > slave) | |
| Constructs a contact pair with an initialized slave contact point. | |
| ~ContactPair () | |
| virtual bool | inContact () |
| Returns true if the pair is currently considered in contact. | |
| virtual void | computeNmatrix (FloatMatrix &answer) |
| Computes the contact interpolation matrix (N-matrix) for this pair. | |
| virtual void | compute_dNdxi_matrices (std::vector< FloatMatrix > &answer) |
| Computes derivatives of shape functions w.r.t. local surface parameters. | |
| virtual void | computeCurvature (FloatMatrix &G, TimeStep *tStep) |
| Computes curvature-related quantities of the contact surface at the contact point. | |
| ContactPoint * | giveMasterContactPoint () |
| Returns the master contact point (non-owning pointer). | |
| ContactPoint * | giveSlaveContactPoint () |
| Returns the slave contact point (non-owning pointer). | |
| void | giveLocationArray (const IntArray &dofs, IntArray &loc, const UnknownNumberingScheme &ns) const |
| Builds a location array for the pair based on selected DOFs. | |
| double | giveNormalGap () |
| Returns the current normal gap (signed separation) of the pair. | |
| void | setNormalGap (double ng) |
| Sets the current normal gap (signed separation) of the pair. | |
| const FloatArray & | giveNormalVector () const |
| Returns the current unit normal vector associated with the contact configuration. | |
| const FloatArray & | givePreviousNormalVector () const |
| Returns the unit normal vector from the previous stored state. | |
| const FloatArray & | giveTangentVector (int i) const |
| Returns the i-th current tangent vector at the contact point. | |
| const FloatArray & | givePreviousTangentVector (int i) const |
| Returns the i-th tangent vector from the previous stored state. | |
| std::vector< FloatArray > | giveTangentVectors () const |
| Returns all current tangent vectors (typically one or two, depending on surface dimension). | |
| std::vector< FloatArray > | givePreviousTangentVectors () const |
| Returns the slave local coordinates used to parameterize the contact point. | |
| const FloatArray & | giveLocalCoordinates () const |
| Returns the slave local coordinates used to parameterize the contact point. | |
| void | initContactPoint () |
| Initializes contact-point related quantities for the pair. | |
| FloatArray | computeContactPointDisplacement () const |
| Computes displacement at the contact point. | |
| void | setNormalVector (const FloatArray &nv) |
| Sets the current normal vector. | |
| void | setTangentVector1 (const FloatArray &tv1) |
| Sets the first tangent vector. | |
| void | setTangentVector2 (const FloatArray &tv2) |
| Sets the second tangent vector. | |
| void | setTempTractionVector (const FloatArray &tv) |
| Sets a temporary traction vector (e.g., predictor or iteration-local value). | |
| const FloatArray & | giveTractionVector () const |
| Returns the current traction vector associated with the contact constraint. | |
| void | setMasterContactPoint (std::unique_ptr< ContactPoint > m) |
| Assigns a master contact point for this pair. | |
| void | setSlaveContactPoint (std::unique_ptr< ContactPoint > s) |
| Assigns a slave contact point for this pair. | |
| virtual void | updateYourself (TimeStep *tStep) |
| Updates internal state of the contact pair for the given time step. | |
| void | computeVectorOf (ValueModeType u, TimeStep *tStep, FloatArray &answer) |
| Computes a vector quantity for the pair in a given value mode. | |
| AABB | computeSlaveAABB () |
| Computes an axis-aligned bounding box (AABB) for the slave side. | |
Protected Attributes | |
| std::unique_ptr< ContactPoint > | master |
| std::unique_ptr< ContactPoint > | slave |
| double | normal_gap = 0 |
| FloatArray | normalVector |
| FloatArray | previousNormalVector |
| FloatArray | tangentVector1 |
| FloatArray | previousTangentVector1 |
| FloatArray | tangentVector2 |
| FloatArray | previousTangentVector2 |
| FloatArray | referenceContactPointCoords |
| FloatArray | tempReferenceContactPointCoords |
| FloatArray | contactPointCoords |
| FloatArray | previousContactPointCoords |
| bool | referenceContactPointInit = false |
| FloatArray | tractionVector |
| FloatArray | tempTractionVector |
| double | dXi |
| double | temp_dXi |
Represents a contact interaction between a master and a slave contact point.
The ContactPair class encapsulates all data and operations associated with a single master–slave contact interaction in a contact mechanics formulation. It stores pointers to the corresponding master and slave ContactPoint objects and maintains the quantities required to evaluate contact constraints, such as normal gap, contact forces (tractions), and their temporary or incremental values.
The class provides functionality for:
A ContactPair does not own the global contact algorithm itself; instead, it serves as a lightweight container and evaluator for a single detected contact interaction, used by higher-level classes.
Definition at line 67 of file contactpair.h.
| oofem::ContactPair::ContactPair | ( | std::unique_ptr< ContactPoint > | slave | ) |
Constructs a contact pair with an initialized slave contact point.
The master contact point is typically assigned later by a contact search/projection procedure once a suitable master entity has been found.
Definition at line 40 of file contactpair.C.
References slave, and tractionVector.
|
inline |
Definition at line 102 of file contactpair.h.
|
virtual |
Computes derivatives of shape functions w.r.t. local surface parameters.
Typically used for tangent construction, curvature evaluation, and consistent linearization of contact constraints.
| answer | Output list of derivative matrices (one per local parameter). |
Definition at line 119 of file contactpair.C.
References oofem::FloatMatrix::giveNumberOfColumns(), oofem::FloatMatrix::giveNumberOfRows(), master, oofem::FloatMatrix::resize(), oofem::FloatMatrix::setSubMatrix(), slave, oofem::FloatMatrix::times(), and oofem::FloatMatrix::zero().
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact().
| FloatArray oofem::ContactPair::computeContactPointDisplacement | ( | ) | const |
Computes displacement at the contact point.
Useful for gap/penetration evaluation and traction update procedures.
Definition at line 213 of file contactpair.C.
References contactPointCoords, master, previousContactPointCoords, and oofem::FloatArray::times().
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeTractions().
|
virtual |
Computes curvature-related quantities of the contact surface at the contact point.
| G | Output curvature matrix/tensor representation. |
| tStep | Current time step. |
Definition at line 146 of file contactpair.C.
References master, and normalVector.
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact().
|
virtual |
Computes the contact interpolation matrix (N-matrix) for this pair.
Used to map nodal/DOF quantities to the contact point (e.g., for assembling contact contributions). The exact definition depends on the underlying contact point types.
| answer | Output matrix. |
Definition at line 97 of file contactpair.C.
References oofem::FloatMatrix::giveNumberOfColumns(), oofem::FloatMatrix::giveNumberOfRows(), master, oofem::FloatMatrix::resize(), oofem::FloatMatrix::setSubMatrix(), slave, and oofem::FloatMatrix::times().
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeInternalForcesFromContact(), and oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact().
| AABB oofem::ContactPair::computeSlaveAABB | ( | ) |
Computes an axis-aligned bounding box (AABB) for the slave side.
Typically used to accelerate contact search and broad-phase collision tests.
Definition at line 226 of file contactpair.C.
References oofem::AABB::max, oofem::AABB::min, slave, oofem::Vector::x, oofem::Vector::y, and oofem::Vector::z.
| void oofem::ContactPair::computeVectorOf | ( | ValueModeType | u, |
| TimeStep * | tStep, | ||
| FloatArray & | answer ) |
Computes a vector quantity for the pair in a given value mode.
This is a convenience wrapper to retrieve quantities such as displacements or other state vectors at the involved contact points.
| u | Requested value mode/quantity selector. |
| tStep | Current time step. |
| answer | Output vector. |
Definition at line 201 of file contactpair.C.
References oofem::FloatArray::copySubVector(), oofem::FloatArray::giveSize(), master, and slave.
|
inline |
Returns the slave local coordinates used to parameterize the contact point.
Definition at line 200 of file contactpair.h.
References slave.
| void oofem::ContactPair::giveLocationArray | ( | const IntArray & | dofs, |
| IntArray & | loc, | ||
| const UnknownNumberingScheme & | ns ) const |
Builds a location array for the pair based on selected DOFs.
Used during assembly of contact contributions into the global system.
| dofs | DOF mask/IDs to include. |
| loc | Output location array. |
| ns | Numbering scheme. |
Definition at line 168 of file contactpair.C.
References oofem::IntArray::followedBy(), master, and slave.
Referenced by oofem::ContactBoundaryCondition::giveLocationArray().
|
inline |
Returns the master contact point (non-owning pointer).
Definition at line 145 of file contactpair.h.
References master.
|
inline |
Returns the current normal gap (signed separation) of the pair.
Definition at line 163 of file contactpair.h.
References normal_gap.
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeInternalForcesFromContact(), oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact(), oofem::StructuralPenaltyContactBoundaryCondition::computeTractions(), and updateYourself().
|
inline |
Returns the current unit normal vector associated with the contact configuration.
Definition at line 172 of file contactpair.h.
References normalVector.
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeInternalForcesFromContact(), and oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact().
|
inline |
Returns the unit normal vector from the previous stored state.
Definition at line 176 of file contactpair.h.
References previousNormalVector.
| const FloatArray & oofem::ContactPair::givePreviousTangentVector | ( | int | i | ) | const |
Returns the i-th tangent vector from the previous stored state.
| i | Tangent index. |
Definition at line 59 of file contactpair.C.
References OOFEM_ERROR, previousTangentVector1, previousTangentVector2, tangentVector1, and tangentVector2.
Referenced by givePreviousTangentVectors().
| std::vector< FloatArray > oofem::ContactPair::givePreviousTangentVectors | ( | ) | const |
Returns the slave local coordinates used to parameterize the contact point.
Definition at line 88 of file contactpair.C.
References givePreviousTangentVector().
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeTractions().
|
inline |
Returns the slave contact point (non-owning pointer).
Definition at line 149 of file contactpair.h.
References slave.
| const FloatArray & oofem::ContactPair::giveTangentVector | ( | int | i | ) | const |
Returns the i-th current tangent vector at the contact point.
| i | Tangent index. |
Definition at line 47 of file contactpair.C.
References OOFEM_ERROR, tangentVector1, and tangentVector2.
Referenced by giveTangentVectors().
| std::vector< FloatArray > oofem::ContactPair::giveTangentVectors | ( | ) | const |
Returns all current tangent vectors (typically one or two, depending on surface dimension).
Definition at line 79 of file contactpair.C.
References giveTangentVector().
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeInternalForcesFromContact(), oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact(), and oofem::StructuralPenaltyContactBoundaryCondition::computeTractions().
|
inline |
Returns the current traction vector associated with the contact constraint.
Definition at line 232 of file contactpair.h.
References tractionVector.
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeTractions().
|
inlinevirtual |
Returns true if the pair is currently considered in contact.
The default implementation delegates the decision to the master contact point (if available). If no master is assigned, the pair cannot be in contact.
Definition at line 110 of file contactpair.h.
References master.
Referenced by updateYourself().
| void oofem::ContactPair::initContactPoint | ( | ) |
Initializes contact-point related quantities for the pair.
Typically called after assigning master/slave points and before first evaluation.
Definition at line 154 of file contactpair.C.
References contactPointCoords, master, referenceContactPointCoords, referenceContactPointInit, and slave.
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeInternalForcesFromContact(), and oofem::StructuralPenaltyContactBoundaryCondition::computeTangentFromContact().
|
inline |
Assigns a master contact point for this pair.
Definition at line 236 of file contactpair.h.
References master.
|
inline |
Sets the current normal gap (signed separation) of the pair.
Definition at line 167 of file contactpair.h.
|
inline |
Sets the current normal vector.
Definition at line 216 of file contactpair.h.
|
inline |
Assigns a slave contact point for this pair.
Definition at line 240 of file contactpair.h.
References slave.
|
inline |
Sets the first tangent vector.
Definition at line 220 of file contactpair.h.
|
inline |
Sets the second tangent vector.
Definition at line 224 of file contactpair.h.
|
inline |
Sets a temporary traction vector (e.g., predictor or iteration-local value).
Definition at line 228 of file contactpair.h.
Referenced by oofem::StructuralPenaltyContactBoundaryCondition::computeInternalForcesFromContact().
|
virtual |
Updates internal state of the contact pair for the given time step.
Typical responsibilities include storing previous normals/tangents, updating contact kinematics, and synchronizing traction/gap-related data.
| tStep | Current time step. |
Definition at line 180 of file contactpair.C.
References giveNormalGap(), inContact(), master, normalVector, previousContactPointCoords, previousNormalVector, previousTangentVector1, previousTangentVector2, referenceContactPointInit, tangentVector1, tangentVector2, tempTractionVector, and tractionVector.
|
protected |
Definition at line 82 of file contactpair.h.
Referenced by computeContactPointDisplacement(), and initContactPoint().
|
protected |
Definition at line 90 of file contactpair.h.
|
protected |
Definition at line 70 of file contactpair.h.
Referenced by compute_dNdxi_matrices(), computeContactPointDisplacement(), computeCurvature(), computeNmatrix(), computeVectorOf(), giveLocationArray(), giveMasterContactPoint(), inContact(), initContactPoint(), setMasterContactPoint(), and updateYourself().
|
protected |
Definition at line 72 of file contactpair.h.
Referenced by giveNormalGap().
|
protected |
Definition at line 73 of file contactpair.h.
Referenced by computeCurvature(), giveNormalVector(), and updateYourself().
|
protected |
Definition at line 84 of file contactpair.h.
Referenced by computeContactPointDisplacement(), and updateYourself().
|
protected |
Definition at line 74 of file contactpair.h.
Referenced by givePreviousNormalVector(), and updateYourself().
|
protected |
Definition at line 76 of file contactpair.h.
Referenced by givePreviousTangentVector(), and updateYourself().
|
protected |
Definition at line 78 of file contactpair.h.
Referenced by givePreviousTangentVector(), and updateYourself().
|
protected |
Definition at line 80 of file contactpair.h.
Referenced by initContactPoint().
|
protected |
Definition at line 85 of file contactpair.h.
Referenced by initContactPoint(), and updateYourself().
|
protected |
Definition at line 71 of file contactpair.h.
Referenced by compute_dNdxi_matrices(), computeNmatrix(), computeSlaveAABB(), computeVectorOf(), ContactPair(), giveLocalCoordinates(), giveLocationArray(), giveSlaveContactPoint(), initContactPoint(), and setSlaveContactPoint().
|
protected |
Definition at line 75 of file contactpair.h.
Referenced by givePreviousTangentVector(), giveTangentVector(), and updateYourself().
|
protected |
Definition at line 77 of file contactpair.h.
Referenced by givePreviousTangentVector(), giveTangentVector(), and updateYourself().
|
protected |
Definition at line 91 of file contactpair.h.
|
protected |
Definition at line 81 of file contactpair.h.
|
protected |
Definition at line 88 of file contactpair.h.
Referenced by updateYourself().
|
protected |
Definition at line 87 of file contactpair.h.
Referenced by ContactPair(), giveTractionVector(), and updateYourself().